Skip to content

Commit

Permalink
Do not use bare except
Browse files Browse the repository at this point in the history
Replace two instances of bare `except` statements. This is a flake8
violation and for good reason.
  • Loading branch information
jpgrayson committed Mar 16, 2018
1 parent 38de6ff commit 291c333
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion desmod/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def _safe_eval(expr, coerce_type=None, eval_locals=None):
eval_locals = _default_eval_locals
try:
value = eval(expr, {'__builtins__': None}, eval_locals)
except:
except BaseException:
if coerce_type and issubclass(coerce_type, six.string_types):
value = expr
else:
Expand Down
2 changes: 1 addition & 1 deletion desmod/tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def __init__(self, env):
self.tracers.append(self.vcd_tracer)
self.sqlite_tracer = SQLiteTracer(env)
self.tracers.append(self.sqlite_tracer)
except:
except BaseException:
self.close()
raise

Expand Down

0 comments on commit 291c333

Please sign in to comment.