Skip to content

Commit 9937fc8

Browse files
committed
catch errors when update db
1 parent 2df6668 commit 9937fc8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

creds

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,10 @@ def update():
119119
"""
120120
Update database records
121121
"""
122-
get_db('/tmp',"Check for new updates...🔍")
123-
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...")
124-
122+
try:
123+
get_db('/tmp',"Check for new updates...🔍")
124+
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...")
125+
except Exception:
126+
print("⚠️ Operation failed, ERR_INTERNET_DISCONNECTED !! 🦄")
125127
if __name__ == "__main__":
126128
fire.Fire()

0 commit comments

Comments
 (0)