URI: 
       tBetter error when opening a non-wallet file - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 72fdf0cd216c39cc59927bb0f63066432bcd4426
   DIR parent 1afb64420385e218c6905a7095757e90c468feba
  HTML Author: Neil Booth <kyuupichan@gmail.com>
       Date:   Wed, 23 Dec 2015 13:54:43 +0900
       
       Better error when opening a non-wallet file
       
       Also window modality fixes for __init__.py
       
       Diffstat:
         M gui/qt/__init__.py                  |       4 ++--
         M lib/wallet.py                       |       2 +-
       
       2 files changed, 3 insertions(+), 3 deletions(-)
       ---
   DIR diff --git a/gui/qt/__init__.py b/gui/qt/__init__.py
       t@@ -134,7 +134,7 @@ class ElectrumGui:
                try:
                    storage = WalletStorage(filename)
                except Exception as e:
       -            QMessageBox.information(None, _('Error'), str(e), _('OK'))
       +            WindowModalDialog.warning(None, _('Error'), str(e))
                    return
                if not storage.file_exists:
                    recent = self.config.get('recently_open', [])
       t@@ -147,7 +147,7 @@ class ElectrumGui:
                        wallet = Wallet(storage)
                    except BaseException as e:
                        traceback.print_exc(file=sys.stdout)
       -                QMessageBox.warning(None, _('Warning'), str(e), _('OK'))
       +                WindowModalDialog.warning(None, _('Warning'), str(e))
                        return
                    action = wallet.get_action()
                # run wizard
   DIR diff --git a/lib/wallet.py b/lib/wallet.py
       t@@ -69,11 +69,11 @@ class WalletStorage(PrintError):
                except:
                    try:
                        d = ast.literal_eval(data)  #parse raw data from reading wallet file
       +                labels = d.get('labels', {})
                    except Exception as e:
                        raise IOError("Cannot read wallet file '%s'" % self.path)
                    self.data = {}
                    # In old versions of Electrum labels were latin1 encoded, this fixes breakage.
       -            labels = d.get('labels', {})
                    for i, label in labels.items():
                        try:
                            unicode(label)