From cb2d5ff3d6f58f62fccc8b2b8a36c6b772a49957 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Tue, 14 Mar 2017 08:56:30 +0100 Subject: [PATCH] raise special exception for dangling links --- electrum | 1 + lib/simple_config.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/electrum b/electrum index 6c1691be..b9ab1964 100755 --- a/electrum +++ b/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') diff --git a/lib/simple_config.py b/lib/simple_config.py index c77d7e63..748702af 100644 --- a/lib/simple_config.py +++ b/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")