Commented out old license_handler()

This commit is contained in:
sTiKyt 2020-08-13 22:59:01 +03:00
parent 4952814a97
commit ae96a7d302
No known key found for this signature in database
GPG Key ID: 510E1C3C9B2414B4

View File

@ -22,28 +22,28 @@ from Defs.ImportManager.unsorted_will_be_replaced import try_to_run_command
default_palette = theme.default_palette default_palette = theme.default_palette
def license_handler(): # def license_handler():
""" Checks if eula.txt exists, creates one if it doesn't. Checks if "eula = True" is inside. # """ Checks if eula.txt exists, creates one if it doesn't. Checks if "eula = True" is inside.
#
Returns: # Returns:
boolean: Returns True if "eula = True" is inside eula.txt, False by default. # boolean: Returns True if "eula = True" is inside eula.txt, False by default.
""" # """
eula = pathlib_Path("eula.txt") # eula = pathlib_Path("eula.txt")
if eula.exists(): # if eula.exists():
with open("eula.txt", "r") as f: # with open("eula.txt", "r") as f:
if "eula = True" in f.read(): # if "eula = True" in f.read():
print("Found your license agreement, proceeding...") # print("Found your license agreement, proceeding...")
return True # return True
else: # else:
print("Please read and accept license.") # print("Please read and accept license.")
return False # return False
else: # else:
eula.touch(mode=0o777, exist_ok=True) # eula.touch(mode=0o777, exist_ok=True)
eula = open("eula.txt", "w") # eula = open("eula.txt", "w")
eula.write(localization.write_eula + "eula = False") # eula.write(localization.write_eula + "eula = False")
eula.close() # eula.close()
print("Please accept EULA.") # print("Please accept EULA.")
return False # return False
def exit_message(port=80): # Message when HiddenEye exit def exit_message(port=80): # Message when HiddenEye exit