From f732365821871c8e56c0998fbefc0baaa14036fa Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Thu, 30 Apr 2015 08:23:57 +0900 Subject: [PATCH 1/2] Determine is_local not based on cwd but on existence of setup-release.py The goal is to be able to run local instances from arbitrary directories. It seems that the chances of having a setup-release.py in the same directory as an installed electrum are extremely remote: not only is the name unusual, but the file isn't installed anyway. --- electrum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum b/electrum index 6490ad51..6183a1ee 100755 --- a/electrum +++ b/electrum @@ -29,7 +29,7 @@ import traceback script_dir = os.path.dirname(os.path.realpath(__file__)) is_bundle = getattr(sys, 'frozen', False) -is_local = not is_bundle and script_dir == os.getcwd() +is_local = not is_bundle and os.path.exists(os.path.join(script_dir, "setup.py")) is_android = 'ANDROID_DATA' in os.environ if is_local or is_android: From d27d80eb281689ece8cd153fd83218e17f0ee735 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Thu, 30 Apr 2015 08:29:15 +0900 Subject: [PATCH 2/2] Should have been setup-release.py --- electrum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum b/electrum index 6183a1ee..e43eb7ab 100755 --- a/electrum +++ b/electrum @@ -29,7 +29,7 @@ import traceback script_dir = os.path.dirname(os.path.realpath(__file__)) is_bundle = getattr(sys, 'frozen', False) -is_local = not is_bundle and os.path.exists(os.path.join(script_dir, "setup.py")) +is_local = not is_bundle and os.path.exists(os.path.join(script_dir, "setup-release.py")) is_android = 'ANDROID_DATA' in os.environ if is_local or is_android: