Skip to content

Commit 3a78bf0

Browse files
committed
handle config connection error
1 parent f9cc45e commit 3a78bf0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

beeswarm/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = '0.4.12'
1+
version = '0.4.13'

beeswarm/shared/helpers.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,11 @@ def extract_keys(work_dir, config):
230230
def extract_config_from_api(config_url):
231231
# meh, MiTM problem here... Acceptable? Workaround?
232232
# maybe print fingerprint on the web ui and let user verify manually?
233-
req = requests.get(config_url, verify=False)
233+
try:
234+
req = requests.get(config_url, verify=False)
235+
except Exception as ex:
236+
logger.error('Error while extracting config: {0}'.format(ex))
237+
return False
234238
if req.status_code == 200:
235239
config = json.loads(req.text, object_hook=asciify)
236240
with open('beeswarmcfg.json', 'w') as local_config:

0 commit comments

Comments
 (0)