Browse Source

[msys2]: remove mswin_pw_warning

The MMGen Project 5 years ago
parent
commit
0f8d259cf6
5 changed files with 1 additions and 21 deletions
  1. 0 3
      data_files/mmgen.cfg
  2. 0 8
      mmgen/common.py
  3. 1 4
      mmgen/globalvars.py
  4. 0 2
      mmgen/seed.py
  5. 0 4
      mmgen/util.py

+ 0 - 3
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 #
 ###################

+ 0 - 8
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))

+ 1 - 4
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

+ 0 - 2
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
 

+ 0 - 4
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):