Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Commit

Permalink
Add default Exceptions/Errors #354
Browse files Browse the repository at this point in the history
  • Loading branch information
mohabusama committed Apr 9, 2019
1 parent ca27f06 commit 549c580
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions zmon_worker_monitor/zmon_worker/tasks/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,12 +695,15 @@ def build_default_context():
'abs': abs,
'all': all,
'any': any,
'AttributeError': AttributeError,
'avg': avg,
'basestring': str,
'bin': bin,
'bool': bool,
'chain': itertools.chain,
'chr': chr,
'ConnectionError': requests.ConnectionError,
'ConnectTimeout': requests.ConnectTimeout,
'Counter': Counter,
'dict': dict,
'divmod': divmod,
Expand All @@ -714,11 +717,14 @@ def build_default_context():
'float': float,
'groupby': itertools.groupby,
'hex': hex,
'HTTPError': requests.HTTPError,
'IndexError': IndexError,
'int': int,
'isinstance': isinstance,
'json': json.loads,
'jsonpath_flat_filter': jsonpath_flat_filter,
'jsonpath_parse': jsonpath_rw.parse,
'KeyError': KeyError,
'len': len,
'list': list,
'long': int,
Expand All @@ -727,6 +733,7 @@ def build_default_context():
'max': max,
'median': mathfun.median,
'min': min,
'NameError': NameError,
'normalvariate': random.normalvariate,
'oct': oct,
'ord': ord,
Expand All @@ -738,6 +745,7 @@ def build_default_context():
'reduce': functools.reduce,
'reversed': reversed,
'round': round,
'RuntimeError': RuntimeError,
'set': set,
'sorted': sorted,
'str': str,
Expand All @@ -749,7 +757,9 @@ def build_default_context():
'unichr': chr,
'unicode': str,
'urlparse': urlparse,
'ValueError': ValueError,
'xrange': range,
'ZeroDivisionError': ZeroDivisionError,
'zip': zip,
}

Expand Down

0 comments on commit 549c580

Please sign in to comment.