URI: 
       tsimplify packages insertion - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 56e80566f9fe1fa741c8e7c9d1d7cd2f93eca53e
   DIR parent fd8a931608d3676cf7220dc955b41b7b95dbc14b
  HTML Author: ThomasV <thomasv@gitorious>
       Date:   Tue, 27 Jan 2015 13:50:02 +0100
       
       simplify packages insertion
       
       Diffstat:
         M electrum                            |      20 ++++++--------------
       
       1 file changed, 6 insertions(+), 14 deletions(-)
       ---
   DIR diff --git a/electrum b/electrum
       t@@ -26,23 +26,15 @@ import sys
        import time
        import traceback
        
       -is_local = False
       -is_android = False
       -
       -if sys.platform == 'darwin':
       -    is_bundle = getattr(sys, 'frozen') == "macosx_app"
       -    if is_bundle:
       -        sys.path.insert(0, os.getcwd() + "/lib/python2.7/packages")
       -else:
       -    is_bundle = getattr(sys, 'frozen', False)
       -    is_local = not is_bundle and os.path.dirname(os.path.realpath(__file__)) == os.getcwd()
       -    is_android = 'ANDROID_DATA' in os.environ
       -    if is_local:
       -        sys.path.append('packages')
       -
       +is_bundle = getattr(sys, 'frozen', False)
        is_local = not is_bundle and os.path.dirname(os.path.realpath(__file__)) == os.getcwd()
        is_android = 'ANDROID_DATA' in os.environ
        
       +if is_local:
       +    sys.path.insert(0, 'packages')
       +elif is_bundle and sys.platform=='darwin':
       +    sys.path.insert(0, os.getcwd() + "/lib/python2.7/packages")
       +
        import __builtin__
        __builtin__.use_local_modules = is_local or is_android