From 62913db537a42976b15260258e9c27642c3e0a41 Mon Sep 17 00:00:00 2001 From: jackjack Date: Sat, 20 Aug 2011 01:34:03 +0200 Subject: [PATCH] No more crash when --web without twisted installed #3 --- pywallet.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pywallet.py b/pywallet.py index e7be59e..ea39637 100755 --- a/pywallet.py +++ b/pywallet.py @@ -1921,15 +1921,16 @@ if __name__ == '__main__': if 'ecdsa' in missing_dep: print("'ecdsa' package is not installed, pywallet won't be able to sign/verify messages") - VIEWS = { - 'DumpWallet': WIDumpWallet(), - 'Import': WIImport(), - 'ImportTx': WIImportTx(), - 'DumpTx': WIDumpTx(), - 'Info': WIInfo(), - 'Delete': WIDelete(), - 'Balance': WIBalance() - } + if 'twisted' not in missing_dep: + VIEWS = { + 'DumpWallet': WIDumpWallet(), + 'Import': WIImport(), + 'ImportTx': WIImportTx(), + 'DumpTx': WIDumpTx(), + 'Info': WIInfo(), + 'Delete': WIDelete(), + 'Balance': WIBalance() + } if options.datadir is not None: wallet_dir = options.datadir