Skip to content

Commit

Permalink
catch errors when update db
Browse files Browse the repository at this point in the history
  • Loading branch information
ihebski committed Nov 12, 2023
1 parent 2df6668 commit 9937fc8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions creds
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,10 @@ def update():
"""
Update database records
"""
get_db('/tmp',"Check for new updates...🔍")
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...")

try:
get_db('/tmp',"Check for new updates...🔍")
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...")
except Exception:
print("⚠️ Operation failed, ERR_INTERNET_DISCONNECTED !! 🦄")
if __name__ == "__main__":
fire.Fire()

0 comments on commit 9937fc8

Please sign in to comment.