I can't use os.getlogin() on my service environment, so I just delete it.

This commit is contained in:
Pyhtagodzilla 2025-06-20 13:17:48 +08:00
parent d70c14287b
commit 7d7f57b3f4
2 changed files with 1 additions and 3 deletions

View File

@ -22,9 +22,7 @@ class BUCTAU:
self.USER_USERNAME = os.environ.get('BUCT_AUTHENTICATION_USERNAME')
self.USER_PASSWORD = os.environ.get('BUCT_AUTHENTICATION_PASSWORD')
self.USER_NAME = os.getlogin()
logging.info(f"USER now is {self.USER_NAME}")
logging.info(f"BUCTAU initialized with username:{self.USER_USERNAME}")
logging.info(f"BUCTAU initialized with password:{self.USER_PASSWORD}")
# print(f"USER now is {self.USER_NAME}")

2
run.py
View File

@ -5,7 +5,7 @@ from Authtication import BUCTAU
def main():
"""Main function to run the script."""
authenticator = BUCTAU()
driver = authenticator.init_driver_edge()
driver = authenticator.init_driver_chrome()
past_time = time.time()
while True:
if time.time() - past_time > 10.0: