mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-06-30 08:49:28 +02:00
refactor: bare excepts removed.
This commit is contained in:
parent
7e0308b155
commit
3fd63f8b67
4 changed files with 6 additions and 6 deletions
|
@ -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 = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue