Skip to content

Commit

Permalink
Fix shelf search bug
Browse files Browse the repository at this point in the history
  • Loading branch information
vanderhe committed Aug 20, 2024
1 parent 46a6984 commit 2e866b7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sktools/src/sktools/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,11 +528,12 @@ def is_shelf_file_matching(shelf_file, mydict):
db = shelve.open(shelf_file, 'r')
except dbm.error:
return False
if not type(db) is type(mydict):
return False
match = True
for key in mydict:
match = key in db and db[key] == mydict[key]
try:
match = key in db and db[key] == mydict[key]
except KeyError:
match = False
if not match:
return False
return True
Expand Down

0 comments on commit 2e866b7

Please sign in to comment.