don't use bare except
use "except Exception", or if really needed explicitly "except BaseException"
This commit is contained in:
@@ -35,7 +35,7 @@ def read_json(filename, default):
|
||||
try:
|
||||
with open(path, 'r') as f:
|
||||
r = json.loads(f.read())
|
||||
except:
|
||||
except Exception:
|
||||
r = default
|
||||
return r
|
||||
|
||||
|
||||
Reference in New Issue
Block a user