fixes
This commit is contained in:
6
main.py
6
main.py
@@ -6,7 +6,9 @@ session = get_session()
|
||||
|
||||
if __name__ == "__main__":
|
||||
group_instances = getGroupInstances()
|
||||
if group_instances is not []:
|
||||
if not group_instances:
|
||||
print("No group instances were found! Nothing to do...")
|
||||
else:
|
||||
for instance in group_instances:
|
||||
try:
|
||||
db_instance = DBGroupInstance(timestamp=datetime.now(),
|
||||
@@ -18,5 +20,3 @@ if __name__ == "__main__":
|
||||
print("Instance log added")
|
||||
except Exception as e:
|
||||
print(f"Exception {e}")
|
||||
else:
|
||||
print("No group instances! Nothing to do")
|
@@ -27,7 +27,7 @@ def fakeGroupInstances():
|
||||
"Fake world", None, 0, "vrchat", 0, None, 0, 0, "9/11/2021", "public", ["nothing", "testing"],
|
||||
"http://testing.localhost/thisisnotreal.png", [], datetime.now(), 5, 90, [])
|
||||
|
||||
# fake instance
|
||||
# Fake instance
|
||||
fakeInstance1 = GroupInstance("TESTTESTgrp_69420_aaaaaaaaa",
|
||||
"test", fakeWorld, randint(1, 50))
|
||||
|
||||
@@ -71,8 +71,9 @@ def getGroupInstances():
|
||||
auth_api.verify2_fa(two_factor_auth_code=TwoFactorAuthCode(getTOTP()))
|
||||
else:
|
||||
# TOTP prompt if not configured
|
||||
auth_api.verify2_fa(two_factor_auth_code=input("Enter 2FA Code: "))
|
||||
# Calling verify2fa if the account has 2FA enabled
|
||||
auth_api.verify2_fa(two_factor_auth_code=TwoFactorAuthCode(input("Enter 2FA Code: ")))
|
||||
|
||||
current_user = auth_api.get_current_user()
|
||||
|
||||
# Call groups APIs
|
||||
|
Reference in New Issue
Block a user