1
0

qt: try even harder not to crash whole app on first start

This commit is contained in:
SomberNight
2018-12-11 21:29:23 +01:00
parent dd848304e6
commit 363dd12a2a
3 changed files with 19 additions and 9 deletions

View File

@@ -413,6 +413,17 @@ def assert_file_in_datadir_available(path, config_path):
'Should be at {}'.format(path))
def get_new_wallet_name(wallet_folder: str) -> str:
i = 1
while True:
filename = "wallet_%d" % i
if filename in os.listdir(wallet_folder):
i += 1
else:
break
return filename
def assert_bytes(*args):
"""
porting helper, assert args type