From b21179c5a17d13d96387413b21cc290ea1d9540f Mon Sep 17 00:00:00 2001 From: poka Date: Wed, 18 Nov 2020 07:34:02 +0100 Subject: [PATCH] Fix empty dunikey --- dialog.py | 2 ++ lib/cesiumMessaging.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/dialog.py b/dialog.py index cf4c291..d882e8a 100755 --- a/dialog.py +++ b/dialog.py @@ -6,6 +6,8 @@ if not os.path.isfile("userEnv.py"): copyfile("userEnv.py.template", "userEnv.py") try: from userEnv import dunikey, pod + if dunikey == "": + raise ValueError("Dunikey is empty") except: sys.stderr.write("Please fill the path to your private key (PubSec), and a Cesium ES address in userEnv.py\n") sys.exit(1) diff --git a/lib/cesiumMessaging.py b/lib/cesiumMessaging.py index 84c0e42..6e3a6f8 100755 --- a/lib/cesiumMessaging.py +++ b/lib/cesiumMessaging.py @@ -11,6 +11,8 @@ class ReadFromCesium: # Get my pubkey from my private key try: self.dunikey = dunikey + if dunikey == "": + raise ValueError("Dunikey is empty") except: sys.stderr.write("Please fill the path to your private key (PubSec)\n") sys.exit(1)