From 0f8d259cf69085289f2c98942492f62e30c10709 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Tue, 18 Feb 2020 14:18:56 +0000 Subject: [PATCH] [msys2]: remove mswin_pw_warning --- data_files/mmgen.cfg | 3 --- mmgen/common.py | 8 -------- mmgen/globalvars.py | 5 +---- mmgen/seed.py | 2 -- mmgen/util.py | 4 ---- 5 files changed, 1 insertion(+), 21 deletions(-) diff --git a/data_files/mmgen.cfg b/data_files/mmgen.cfg index 05a9d5d3..d8d18800 100644 --- a/data_files/mmgen.cfg +++ b/data_files/mmgen.cfg @@ -62,9 +62,6 @@ # Set the maximum input size - applies both to files and standard input: # max_input_size 1048576 -# Uncomment to suppress non-ASCII character password warning for MSWin / MSYS2 -# mswin_pw_warning false - ################### # Altcoin options # ################### diff --git a/mmgen/common.py b/mmgen/common.py index 0dd1c510..a18e1d12 100755 --- a/mmgen/common.py +++ b/mmgen/common.py @@ -240,11 +240,3 @@ def exit_if_mswin(feature): if g.platform == 'win': m = capfirst(feature) + ' not supported on the MSWin / MSYS2 platform' ydie(1,m) - -def mswin_pw_warning(): - if g.platform == 'win' and not opt.echo_passphrase and g.mswin_pw_warning: - m = 'due to a bug in the MSYS2 Python implementation, if your passphrase\n' - m += 'contains non-ASCII characters, you must turn on passphrase echoing with the\n' - m += '--echo-passphrase option or use a password file. Otherwise, the non-ASCII\n' - m += 'characters in your passphrase will be silently ignored!' - msg(red('WARNING: ') + yellow(m)) diff --git a/mmgen/globalvars.py b/mmgen/globalvars.py index 80144033..91c3499f 100755 --- a/mmgen/globalvars.py +++ b/mmgen/globalvars.py @@ -112,9 +112,6 @@ class g(object): test_suite_popen_spawn = False terminal_width = 0 - # warnings - mswin_pw_warning = True - for k in ('linux','win','msys'): if sys.platform[:len(k)] == k: platform = { 'linux':'linux', 'win':'win', 'msys':'win' }[k] @@ -170,7 +167,7 @@ class g(object): 'daemon_data_dir','force_256_color','regtest','subseeds', 'btc_max_tx_fee','ltc_max_tx_fee','bch_max_tx_fee','eth_max_tx_fee', 'eth_mainnet_chain_name','eth_testnet_chain_name', - 'max_tx_file_size','max_input_size','mswin_pw_warning' + 'max_tx_file_size','max_input_size' ) # Supported environmental vars # The corresponding vars (lowercase, minus 'mmgen_') must be initialized in g diff --git a/mmgen/seed.py b/mmgen/seed.py index 2d437738..e9df0329 100755 --- a/mmgen/seed.py +++ b/mmgen/seed.py @@ -786,7 +786,6 @@ an empty passphrase, just hit ENTER twice. elif opt.echo_passphrase: pw = ' '.join(get_words_from_user('Enter {}: '.format(desc))) else: - mswin_pw_warning() for i in range(g.passwd_max_tries): pw = ' '.join(get_words_from_user('Enter {}: '.format(desc))) pw2 = ' '.join(get_words_from_user('Repeat passphrase: ')) @@ -811,7 +810,6 @@ an empty passphrase, just hit ENTER twice. w = pwfile_reuse_warning() ret = ' '.join(get_words_from_file(opt.passwd_file,desc,quiet=w)) else: - mswin_pw_warning() ret = ' '.join(get_words_from_user('Enter {}: '.format(desc))) self.ssdata.passwd = ret diff --git a/mmgen/util.py b/mmgen/util.py index 20dfe2e3..3f87e31c 100755 --- a/mmgen/util.py +++ b/mmgen/util.py @@ -451,8 +451,6 @@ def get_new_passphrase(desc,passchg=False): elif opt.echo_passphrase: pw = ' '.join(get_words_from_user('Enter {}: '.format(w))) else: - from mmgen.common import mswin_pw_warning - mswin_pw_warning() for i in range(g.passwd_max_tries): pw = ' '.join(get_words_from_user('Enter {}: '.format(w))) pw2 = ' '.join(get_words_from_user('Repeat passphrase: ')) @@ -652,8 +650,6 @@ def get_mmgen_passphrase(desc,passchg=False): pwfile_reuse_warning() return ' '.join(get_words_from_file(opt.passwd_file,'passphrase')) else: - from mmgen.common import mswin_pw_warning - mswin_pw_warning() return ' '.join(get_words_from_user(prompt)) def my_raw_input(prompt,echo=True,insert_txt='',use_readline=True):