Browse Source

raise special exception for dangling links

master
ThomasV 9 years ago
parent
commit
cb2d5ff3d6
  1. 1
      electrum
  2. 2
      lib/simple_config.py

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')

2
lib/simple_config.py

@ -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…
Cancel
Save