You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@warble.apache.org by hu...@apache.org on 2018/06/26 14:18:01 UTC
[incubator-warble-node] 05/05: startup banner + tweak wording
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-warble-node.git
commit 5adf60e3803691f87c75da6e28386197b7a6a688
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Tue Jun 26 09:16:44 2018 -0500
startup banner + tweak wording
---
node.py | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/node.py b/node.py
index f63b1c3..c85ef8f 100644
--- a/node.py
+++ b/node.py
@@ -62,6 +62,7 @@ if __name__ == "__main__":
print("Bork: --config passed to program, but could not find config file %s" % args.config)
sys.exit(-1)
+ print("INFO: Starting Warble node software, version %s" % _VERSION)
# Init yaml, load configuration.
# We use ruamel.yaml here, because it preserves the existing structure and
# comments, unlike the traditional yaml library.
@@ -79,7 +80,7 @@ if __name__ == "__main__":
# If key exists, load it...
if os.path.exists(keypath):
- print("Loading private key from %s" % keypath)
+ print("INFO: Loading private key from %s" % keypath)
try:
privkey = plugins.basics.crypto.loadprivate(keypath)
except Exception as err:
@@ -135,16 +136,16 @@ if __name__ == "__main__":
apikey = payload['key']
if payload['encrypted']:
apikey = str(plugins.basics.crypto.decrypt(privkey, base64.b64decode(apikey)), 'ascii')
- print("Fetched API key %s from server" % apikey)
+ print("INFO: Fetched API key %s from server" % apikey)
gconf['client']['apikey'] = apikey
# Save updated changes to disk
yaml.dump(gconf, open(configpath, "w"))
else:
- print("Got unexpected status code %u from Warble server!")
+ print("ALERT: Got unexpected status code %u from Warble server!")
print(rv.text)
sys.exit(-1)
except Exception as err:
- print("Could not connect to the Warble server at %s: %s" % (serverurl, err))
+ print("ALERT: Could not connect to the Warble server at %s: %s" % (serverurl, err))
sys.exit(-1)
else:
apikey = gconf['client'].get('apikey')
@@ -160,13 +161,13 @@ if __name__ == "__main__":
break # We're enabled, yaaay
else:
if args.wait:
- print("Node not eligible yet, but --wait passed, so waiting 30 seconds...")
+ print("WARNING: Node not eligible yet, but --wait passed, so waiting 30 seconds...")
time.sleep(30)
else:
- print("Node has not been marked as enabled on the server, exiting")
+ print("WARNING: Node has not been marked as enabled on the server, exiting")
sys.exit(0)
else:
- print("Unexpected status code %u from Warble server!" % rv.status_code)
+ print("ALERT: Unexpected status code %u from Warble server!" % rv.status_code)
print(rv.text)
sys.exit(-1)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@warble.apache.org
For additional commands, e-mail: commits-help@warble.apache.org