Skip to content

Commit 8f48d32

Browse files
authored
Merge pull request #2267 from barton2526/python
refactor: small python cleanup
2 parents 4428c07 + 4361638 commit 8f48d32

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed
+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from jsonrpc import ServiceProxy
2+
import getpass
23
access = ServiceProxy("http://127.0.0.1:8332")
3-
pwd = raw_input("Enter old wallet passphrase: ")
4-
pwd2 = raw_input("Enter new wallet passphrase: ")
5-
access.walletpassphrasechange(pwd, pwd2)
4+
pwd = getpass.getpass(prompt="Enter old wallet passphrase: ")
5+
pwd2 = getpass.getpass(prompt="Enter new wallet passphrase: ")
6+
access.walletpassphrasechange(pwd, pwd2)

contrib/wallettools/walletunlock.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from jsonrpc import ServiceProxy
2+
import getpass
23
access = ServiceProxy("http://127.0.0.1:8332")
3-
pwd = raw_input("Enter wallet passphrase: ")
4-
access.walletpassphrase(pwd, 60)
4+
pwd = getpass.getpass(prompt="Enter wallet passphrase: ")
5+
access.walletpassphrase(pwd, 60)

share/qt/extract_strings_qt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def parse_po(text):
5858
if not XGETTEXT:
5959
print('Cannot extract strings: xgettext utility is not installed or not configured.',file=sys.stderr)
6060
print('Please install package "gettext" and re-run \'./configure\'.',file=sys.stderr)
61-
exit(1)
61+
sys.exit(1)
6262
child = Popen([XGETTEXT,'--output=-','-n','--keyword=_'] + files, stdout=PIPE)
6363
(out, err) = child.communicate()
6464

0 commit comments

Comments
 (0)