URI: 
       tFix label sync plugin and add in backwards compatibility with 1.8 wallets. Fixes #291 - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 25120ddaf343f5966ac054b1c3029ed3534466d6
   DIR parent a8c2d9520737e8894ce5e65296b1a55f5063fec0
  HTML Author: Maran <maran.hidskes@gmail.com>
       Date:   Mon, 30 Sep 2013 16:21:31 +0200
       
       Fix label sync plugin and add in backwards compatibility with 1.8 wallets. Fixes #291
       
       Diffstat:
         M plugins/labels.py                   |       8 ++++++--
       
       1 file changed, 6 insertions(+), 2 deletions(-)
       ---
   DIR diff --git a/plugins/labels.py b/plugins/labels.py
       t@@ -51,7 +51,10 @@ class Plugin(BasePlugin):
        
            def load_wallet(self, wallet):
                self.wallet = wallet
       -        mpk = self.wallet.master_public_keys["m/0'/"][1]
       +        if self.wallet.get_master_public_key():
       +            mpk = self.wallet.get_master_public_key()
       +        else:
       +            mpk = self.wallet.master_public_keys["m/0'/"][1]
                self.encode_password = hashlib.sha1(mpk).digest().encode('hex')[:32]
                self.wallet_id = hashlib.sha256(mpk).digest().encode('hex')
        
       t@@ -104,7 +107,7 @@ class Plugin(BasePlugin):
                      self.download.setEnabled(False)
                      self.accept.setEnabled(False)
        
       -        d = QDialog(self.window)
       +        d = QDialog()
                layout = QGridLayout(d)
                layout.addWidget(QLabel("API Key: "),0,0)
        
       t@@ -147,6 +150,7 @@ class Plugin(BasePlugin):
            def enable(self):
                if not self.auth_token(): # First run, throw plugin settings in your face
                    self.init()
       +            self.load_wallet(self.gui.main_window.wallet)
                    if self.settings_dialog():
                        self.set_enabled(True)
                        return True