Commit 13727a36 authored by Ziirish's avatar Ziirish

handle a few exceptions

parent 1fbee0c2
Pipeline #1600 failed with stages
in 2 minutes and 16 seconds
......@@ -717,7 +717,7 @@ exclude_comp=gz
'Setting it to 15.'
)
confsrv['max_status_children'] = 15
elif confsrv.version < BURP_BIND_MULTIPLE:
elif confsrv.version and confsrv.version < BURP_BIND_MULTIPLE:
max_status_children = confsrv.get('max_status_children')
if not max_status_children or max_status_children < 15:
confsrv['max_status_children'] = 15
......
......@@ -232,7 +232,7 @@ def create_websocket(myapp, websocket_server=False, celery_worker=False,
redis_url = 'redis://{}:{}/{}'.format(host, port, db)
myapp.config['WS_MESSAGE_QUEUE'] = redis_url
myapp.config['WS_MANAGE_SESSION'] = not myapp.config.get('WITH_SRV_SESSION', False)
if os.getenv('BUI_MODE') == 'celery':
if os.getenv('BUI_MODE', '') == 'celery':
myapp.config['WS_ASYNC_MODE'] = 'threading'
# myapp.config['WS_ASYNC_MODE'] = 'threading' if not gunicorn else None
......
......@@ -475,7 +475,7 @@ class Burp(Burp1):
ret['percent'] = round(
float(ret['bytes']) / float(ret['estimated_bytes']) * 100
)
except ZeroDivisionError:
except ZeroDivisionError, KeyError:
# You know... division by 0
ret['percent'] = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment