Skip to content

Commit

Permalink
Merge pull request #54 from hamoshwani/hamoshwani-patch-AttributeError
Browse files Browse the repository at this point in the history
Fix AttributeError when `keyword` is an integer
  • Loading branch information
ihebski authored May 17, 2023
2 parents 6b8abef + 914a615 commit 18439fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions creds
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ def search(keyword,export=False):
"""
if len(db.all()) == 0:
get_db()
print_table(db.search(where("product").search(keyword.lower())),keyword,export)
print_table(db.search(where("product").search(str(keyword).lower())),keyword,export)
else:
print_table(db.search(where("product").search(keyword.lower())),keyword,export)
print_table(db.search(where("product").search(str(keyword).lower())),keyword,export)

def sha256sum(filename):
"""
Expand All @@ -123,4 +123,4 @@ def update():
print('[+] No action needed, We are fine 🤘') if sha256sum('/tmp/DefaultCreds_db.json') == sha256sum(f"{path}/DefaultCreds_db.json") else get_db(path,"New updates are available 🚧\n[+] Download database...")

if __name__ == "__main__":
fire.Fire()
fire.Fire()

0 comments on commit 18439fd

Please sign in to comment.