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(
|
setup(
|
||||||
name='worthless',
|
name='worthless',
|
||||||
version='2.0.0',
|
version='2.0.1',
|
||||||
packages=['worthless', 'worthless.classes', 'worthless.classes.launcher', 'worthless.classes.installer'],
|
packages=['worthless', 'worthless.classes', 'worthless.classes.launcher', 'worthless.classes.installer'],
|
||||||
url='https://git.froggi.es/tretrauit/worthless-launcher',
|
url='https://git.froggi.es/tretrauit/worthless-launcher',
|
||||||
license='MIT License',
|
license='MIT License',
|
||||||
|
@ -24,10 +24,10 @@ class UI:
|
|||||||
# Fake dialog
|
# Fake dialog
|
||||||
print(question + " [Y/n]:")
|
print(question + " [Y/n]:")
|
||||||
return True
|
return True
|
||||||
answer = ""
|
|
||||||
|
# random text
|
||||||
|
answer = "kurumi3"
|
||||||
while answer.lower() not in ['y', 'n', '']:
|
while answer.lower() not in ['y', 'n', '']:
|
||||||
if answer != "":
|
|
||||||
print("Invalid choice, please try again.")
|
|
||||||
answer = input(question + " [Y/n]: ")
|
answer = input(question + " [Y/n]: ")
|
||||||
return answer.lower() == 'y' or answer == ''
|
return answer.lower() == 'y' or answer == ''
|
||||||
|
|
||||||
@ -244,9 +244,9 @@ class UI:
|
|||||||
print("{}: expected {}, actual {}".format(file[0], file[1], file[2]))
|
print("{}: expected {}, actual {}".format(file[0], file[1], file[2]))
|
||||||
|
|
||||||
async def clear_cache(self):
|
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()
|
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()
|
await self._patcher.clear_cache()
|
||||||
|
|
||||||
|
|
||||||
@ -322,6 +322,9 @@ async def main():
|
|||||||
if args.check_telemetry:
|
if args.check_telemetry:
|
||||||
await ui.check_telemetry()
|
await ui.check_telemetry()
|
||||||
|
|
||||||
|
if args.clear_cache:
|
||||||
|
await ui.clear_cache()
|
||||||
|
|
||||||
# Download
|
# Download
|
||||||
|
|
||||||
if args.download_game:
|
if args.download_game:
|
||||||
@ -371,8 +374,6 @@ async def main():
|
|||||||
if args.verify:
|
if args.verify:
|
||||||
await ui.verify_game()
|
await ui.verify_game()
|
||||||
|
|
||||||
if args.clear_cache:
|
|
||||||
await ui.clear_cache()
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
asyncio.run(main())
|
asyncio.run(main())
|
||||||
|
Loading…
Reference in New Issue
Block a user