fix: _ask won't automatically think the answer is yes.
I am dumb
This commit is contained in:
parent
a5659f7ff3
commit
d4773bc38d
2
setup.py
2
setup.py
@ -9,7 +9,7 @@ README = (HERE / "README.md").read_text()
|
||||
|
||||
setup(
|
||||
name='worthless',
|
||||
version='2.0.0',
|
||||
version='2.0.1',
|
||||
packages=['worthless', 'worthless.classes', 'worthless.classes.launcher', 'worthless.classes.installer'],
|
||||
url='https://git.froggi.es/tretrauit/worthless-launcher',
|
||||
license='MIT License',
|
||||
|
@ -24,10 +24,10 @@ class UI:
|
||||
# Fake dialog
|
||||
print(question + " [Y/n]:")
|
||||
return True
|
||||
answer = ""
|
||||
|
||||
# random text
|
||||
answer = "kurumi3"
|
||||
while answer.lower() not in ['y', 'n', '']:
|
||||
if answer != "":
|
||||
print("Invalid choice, please try again.")
|
||||
answer = input(question + " [Y/n]: ")
|
||||
return answer.lower() == 'y' or answer == ''
|
||||
|
||||
@ -244,9 +244,9 @@ class UI:
|
||||
print("{}: expected {}, actual {}".format(file[0], file[1], file[2]))
|
||||
|
||||
async def clear_cache(self):
|
||||
if self._ask("Do you want to clear Installer cache (contains downloaded game files, etc)"):
|
||||
if self._ask("Do you want to clear Installer cache (contains downloaded game files, etc)?"):
|
||||
await self._installer.clear_cache()
|
||||
if self._ask("Do you want to clear Patcher cache (contains files used to patch)"):
|
||||
if self._ask("Do you want to clear Patcher cache (contains files used to patch)?"):
|
||||
await self._patcher.clear_cache()
|
||||
|
||||
|
||||
@ -322,6 +322,9 @@ async def main():
|
||||
if args.check_telemetry:
|
||||
await ui.check_telemetry()
|
||||
|
||||
if args.clear_cache:
|
||||
await ui.clear_cache()
|
||||
|
||||
# Download
|
||||
|
||||
if args.download_game:
|
||||
@ -371,8 +374,6 @@ async def main():
|
||||
if args.verify:
|
||||
await ui.verify_game()
|
||||
|
||||
if args.clear_cache:
|
||||
await ui.clear_cache()
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
|
Loading…
Reference in New Issue
Block a user