electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 7335a9936e080cb41e55d6f842ec42c80dcf96ef
parent 35200557e4c00516cc2202c3bb55b3d7aaf7ce56
Author: ThomasV <thomasv@gitorious>
Date:   Mon,  5 May 2014 09:24:29 +0200

make do_export_privkey non-gui

Diffstat:
Mgui/qt/main_window.py | 17+++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py @@ -1927,16 +1927,9 @@ class ElectrumWindow(QMainWindow): filename = filename_e.text() if not filename: return - self.do_export_privkeys(filename, private_keys) - - def do_export_privkeys(self, fileName, pklist): try: - with open(fileName, "w+") as csvfile: - transaction = csv.writer(csvfile) - transaction.writerow(["address", "private_key"]) - for addr, pk in pklist.items(): - transaction.writerow(["%34s"%addr,pk]) + self.do_export_privkeys(filename, private_keys) except (IOError, os.error), reason: export_error_label = _("Electrum was unable to produce a private key-export.") QMessageBox.critical(None, _("Unable to create csv"), export_error_label + "\n" + str(reason)) @@ -1948,6 +1941,14 @@ class ElectrumWindow(QMainWindow): self.show_message(_("Private keys exported.")) + def do_export_privkeys(self, fileName, pklist): + with open(fileName, "w+") as csvfile: + transaction = csv.writer(csvfile) + transaction.writerow(["address", "private_key"]) + for addr, pk in pklist.items(): + transaction.writerow(["%34s"%addr,pk]) + + def do_import_labels(self): labelsFile = self.getOpenFileName(_("Open labels file"), "*.dat") if not labelsFile: return