Browse Source

fix import from lib

283
thomasv 13 years ago
parent
commit
8dd3e95708
  1. 9
      electrum

9
electrum

@ -31,13 +31,12 @@ except:
sys.exit(1) sys.exit(1)
try: try:
import lib as electrum from lib import Wallet, WalletSynchronizer, format_satoshis, mnemonic
except: except:
import electrum from electrum import Wallet, WalletSynchronizer, format_satoshis, mnemonic
from optparse import OptionParser from optparse import OptionParser
from decimal import Decimal from decimal import Decimal
from electrum import Wallet, WalletSynchronizer, format_satoshis
known_commands = { known_commands = {
'help':'print help', 'help':'print help',
@ -135,7 +134,7 @@ if __name__ == '__main__':
import electrum.gui as gui import electrum.gui as gui
elif options.gui=='qt': elif options.gui=='qt':
try: try:
import lib.gui_qt as gui import lib.gui_qt as gui
except: except:
import electrum.gui_qt as gui import electrum.gui_qt as gui
else: else:
@ -171,7 +170,6 @@ if __name__ == '__main__':
sys.exit(0) sys.exit(0)
if cmd in ['create', 'restore']: if cmd in ['create', 'restore']:
from electrum import mnemonic
if wallet.file_exists: if wallet.file_exists:
print "remove the existing wallet first!" print "remove the existing wallet first!"
sys.exit(0) sys.exit(0)
@ -293,7 +291,6 @@ if __name__ == '__main__':
print known_commands[cmd2] print known_commands[cmd2]
elif cmd == 'seed': elif cmd == 'seed':
from electrum import mnemonic
seed = wallet.pw_decode( wallet.seed, password) seed = wallet.pw_decode( wallet.seed, password)
print seed + ' "' + ' '.join(mnemonic.mn_encode(seed)) + '"' print seed + ' "' + ' '.join(mnemonic.mn_encode(seed)) + '"'

Loading…
Cancel
Save