Skip to content

Commit

Permalink
add missing import and fix bare excepts
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Tromp committed Jan 17, 2024
1 parent 7e75482 commit 6557f79
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions datahugger/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import logging
import os
import re
import time
import zipfile
from pathlib import Path
from typing import Union
Expand Down Expand Up @@ -233,11 +234,13 @@ def _check_checksums(self, output_folder, files_info):
df2 = df[df['name'] == file].reset_index()
try:
hash = df2['hash'][0]
except:
except Exception as e:
logging.info(f"Setting hash to None: {e}")
hash = None
try:
hash_type = df2['hash_type'][0]
except:
except Exception as e:
logging.info(f"Setting hash_type to None: {e}")
hash_type = None
newhash = None
with open(filepath, "rb") as f:
Expand Down

0 comments on commit 6557f79

Please sign in to comment.