mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Close #19284: Handle -R properly in flag helper
Previously, the -R option would be specified multiple times if PYTHONHASHSEED was set.
This commit is contained in:
parent
ef23f1875d
commit
ac1a248968
1 changed files with 2 additions and 0 deletions
|
@ -506,6 +506,8 @@ def _args_from_interpreter_flags():
|
||||||
for flag, opt in flag_opt_map.items():
|
for flag, opt in flag_opt_map.items():
|
||||||
v = getattr(sys.flags, flag)
|
v = getattr(sys.flags, flag)
|
||||||
if v > 0:
|
if v > 0:
|
||||||
|
if flag == 'hash_randomization':
|
||||||
|
v = 1 # Handle specification of an exact seed
|
||||||
args.append('-' + opt * v)
|
args.append('-' + opt * v)
|
||||||
for opt in sys.warnoptions:
|
for opt in sys.warnoptions:
|
||||||
args.append('-W' + opt)
|
args.append('-W' + opt)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue