fix: return early on cancel

This commit is contained in:
ThomasV 2013-01-05 22:04:32 +01:00
parent bc9e6f88e6
commit 73cd5545aa
1 changed files with 3 additions and 4 deletions

View File

@ -1535,10 +1535,9 @@ class ElectrumWindow(QMainWindow):
def do_import_privkey(self):
text, ok = QInputDialog.getText(self, _('Import private key'), _('Key') + ':')
if ok:
sec = str(text)
password = self.password_dialog()
if not ok: return
sec = str(text)
password = self.password_dialog()
try:
addr = self.wallet.import_key(sec, password)
if not addr: