Spaces:
Runtime error
Runtime error
Update encrypto_file.py
Browse files- encrypto_file.py +8 -9
encrypto_file.py
CHANGED
|
@@ -56,19 +56,18 @@ def checkpassword(username:str,password:str)->int:
|
|
| 56 |
if username not in cred_dict:
|
| 57 |
return 0
|
| 58 |
elif password!= cred_dict[username]:
|
| 59 |
-
try:
|
| 60 |
-
record_login(username)
|
| 61 |
-
except:
|
| 62 |
-
pass
|
| 63 |
return 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
if username =='admin':
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
record_login(username)
|
| 68 |
-
except:
|
| 69 |
-
pass
|
| 70 |
return 1
|
| 71 |
else:
|
|
|
|
| 72 |
return 2
|
| 73 |
|
| 74 |
|
|
|
|
| 56 |
if username not in cred_dict:
|
| 57 |
return 0
|
| 58 |
elif password!= cred_dict[username]:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
return 0
|
| 60 |
+
|
| 61 |
+
try:
|
| 62 |
+
|
| 63 |
+
record_login(username)
|
| 64 |
+
except:
|
| 65 |
+
pass
|
| 66 |
if username =='admin':
|
| 67 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
return 1
|
| 69 |
else:
|
| 70 |
+
|
| 71 |
return 2
|
| 72 |
|
| 73 |
|