refactor: bare excepts removed.

This commit is contained in:
Fabian Joswig 2021-12-13 14:47:57 +00:00
parent 7e0308b155
commit 3fd63f8b67
4 changed files with 6 additions and 6 deletions

View file

@ -226,7 +226,7 @@ def write_ADerrors(obs_list, file_path, bdio_path='./libbdio.so', **kwargs):
for key in keys:
try: # Try to convert key to integer
ids.append(int(key))
except: # If not possible construct a hash
except Exception: # If not possible construct a hash
ids.append(int(hashlib.sha256(key.encode('utf-8')).hexdigest(), 16) % 10 ** 8)
print('ids', ids)
nt = []