1
0

move prompt_password from wallet.py to main script

This commit is contained in:
ThomasV
2012-10-12 01:50:54 +02:00
parent c7311a1e7f
commit d92f1991a9
4 changed files with 22 additions and 26 deletions

View File

@@ -1,3 +1,3 @@
from wallet import Wallet, format_satoshis, prompt_password
from wallet import Wallet, format_satoshis
from interface import WalletSynchronizer, Interface, pick_random_server
from simple_config import SimpleConfig

View File

@@ -26,7 +26,6 @@ import operator
import ast
import threading
import random
import getpass
import aes
import ecdsa
@@ -158,24 +157,6 @@ def ASecretToSecret(key):
########### end pywallet functions #######################
# get password routine
def prompt_password(prompt, confirm=True):
if sys.stdin.isatty():
password = getpass.getpass(prompt)
if password and confirm:
password2 = getpass.getpass("Confirm: ")
if password != password2:
sys.exit("Error: Passwords do not match.")
else:
password = raw_input(prompt)
if not password:
password = None
return password
# URL decode
_ud = re.compile('%([0-9a-hA-H]{2})', re.MULTILINE)