raise special exception for dangling links
This commit is contained in:
parent
b27aeadb71
commit
cb2d5ff3d6
1
electrum
1
electrum
|
@ -353,6 +353,7 @@ if __name__ == '__main__':
|
|||
sys.exit(1)
|
||||
config_options['url'] = uri
|
||||
|
||||
# todo: defer this to gui
|
||||
config = SimpleConfig(config_options)
|
||||
cmdname = config.get('cmd')
|
||||
|
||||
|
|
|
@ -161,6 +161,8 @@ class SimpleConfig(PrintError):
|
|||
# default path
|
||||
dirpath = os.path.join(self.path, "wallets")
|
||||
if not os.path.exists(dirpath):
|
||||
if os.path.islink(dirpath):
|
||||
raise BaseException('Dangling link: ' + dirpath)
|
||||
os.mkdir(dirpath)
|
||||
|
||||
new_path = os.path.join(self.path, "wallets", "default_wallet")
|
||||
|
|
Loading…
Reference in New Issue