1
0

try to import all python dependencies from the main script

This commit is contained in:
ThomasV
2015-01-26 14:14:16 +01:00
parent d14c03b47f
commit 16c72d286c
4 changed files with 36 additions and 37 deletions

View File

@@ -26,15 +26,8 @@ import hmac
import version
from util import print_error, InvalidPassword
try:
import ecdsa
except ImportError:
sys.exit("Error: python-ecdsa does not seem to be installed. Try 'sudo pip install ecdsa'")
try:
import aes
except ImportError:
sys.exit("Error: AES does not seem to be installed. Try 'sudo pip install slowaes'")
import ecdsa
import aes
################################## transactions
@@ -401,12 +394,7 @@ def is_private_key(key):
########### end pywallet functions #######################
try:
from ecdsa.ecdsa import curve_secp256k1, generator_secp256k1
except Exception:
print "cannot import ecdsa.curve_secp256k1. You probably need to upgrade ecdsa.\nTry: sudo pip install --upgrade ecdsa"
exit()
from ecdsa.ecdsa import curve_secp256k1, generator_secp256k1
from ecdsa.curves import SECP256k1
from ecdsa.ellipticcurve import Point
from ecdsa.util import string_to_number, number_to_string