No more crash when --web without twisted installed

This commit is contained in:
jackjack 2011-08-19 21:42:41 +02:00
parent 9b7f065251
commit 438b12e549

View File

@ -1613,7 +1613,7 @@ def inverse_str(string):
ret += string[len(string)-2-2*i+1]; ret += string[len(string)-2-2*i+1];
return ret return ret
if 'twisted' not in missing_dep:
class WIInfo(resource.Resource): class WIInfo(resource.Resource):
def render_GET(self, request): def render_GET(self, request):
@ -1870,16 +1870,6 @@ if __name__ == '__main__':
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
VIEWS = {
'DumpWallet': WIDumpWallet(),
'Import': WIImport(),
'ImportTx': WIImportTx(),
'DumpTx': WIDumpTx(),
'Info': WIInfo(),
'Delete': WIDelete(),
'Balance': WIBalance()
}
# a=Popen("ps xa | grep ' bitcoin'", shell=True, bufsize=-1, stdout=PIPE).stdout # a=Popen("ps xa | grep ' bitcoin'", shell=True, bufsize=-1, stdout=PIPE).stdout
# aread=a.read() # aread=a.read()
# nl = aread.count("\n") # nl = aread.count("\n")
@ -1930,6 +1920,15 @@ if __name__ == '__main__':
if 'ecdsa' in missing_dep: if 'ecdsa' in missing_dep:
print("'ecdsa' package is not installed, pywallet won't be able to sign/verify messages") 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 options.datadir is not None: if options.datadir is not None:
wallet_dir = options.datadir wallet_dir = options.datadir