URI: 
       tmove jnius wrapper to main script - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 528c3386b4e70859381e29fa0d822072d3ef6205
   DIR parent 8249f5ab67a8fa70cfa2909fec972259fcd2cfc8
  HTML Author: ThomasV <thomasv@electrum.org>
       Date:   Mon, 24 Oct 2016 15:24:06 +0200
       
       move jnius wrapper to main script
       
       Diffstat:
         M electrum                            |      15 +++++++++++++++
         M gui/kivy/__init__.py                |      16 ----------------
       
       2 files changed, 15 insertions(+), 16 deletions(-)
       ---
   DIR diff --git a/electrum b/electrum
       t@@ -27,6 +27,21 @@
        import os
        import sys
        
       +# from https://gist.github.com/tito/09c42fb4767721dc323d
       +import threading
       +try:
       +    import jnius
       +except:
       +    jnius = None
       +if jnius:
       +    orig_thread_run = threading.Thread.run
       +    def thread_check_run(*args, **kwargs):
       +        try:
       +            return orig_thread_run(*args, **kwargs)
       +        finally:
       +            jnius.detach()
       +    threading.Thread.run = thread_check_run
       +
        
        script_dir = os.path.dirname(os.path.realpath(__file__))
        is_bundle = getattr(sys, 'frozen', False)
   DIR diff --git a/gui/kivy/__init__.py b/gui/kivy/__init__.py
       t@@ -41,22 +41,6 @@ kivy.require('1.8.0')
        from kivy.logger import Logger
        from main_window import ElectrumWindow
        
       -# from https://gist.github.com/tito/09c42fb4767721dc323d
       -import threading
       -try:
       -    import jnius
       -except:
       -    jnius = None
       -
       -if jnius:
       -    orig_thread_run = threading.Thread.run
       -    def thread_check_run(*args, **kwargs):
       -        try:
       -            return orig_thread_run(*args, **kwargs)
       -        finally:
       -            #print "jnius detach", threading.currentThread()
       -            jnius.detach()
       -    threading.Thread.run = thread_check_run