Skip to content

Commit ac1a248

Browse files
committed
Close python#19284: Handle -R properly in flag helper
Previously, the -R option would be specified multiple times if PYTHONHASHSEED was set.
1 parent ef23f18 commit ac1a248

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Lib/subprocess.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,8 @@ def _args_from_interpreter_flags():
506506
for flag, opt in flag_opt_map.items():
507507
v = getattr(sys.flags, flag)
508508
if v > 0:
509+
if flag == 'hash_randomization':
510+
v = 1 # Handle specification of an exact seed
509511
args.append('-' + opt * v)
510512
for opt in sys.warnoptions:
511513
args.append('-W' + opt)

0 commit comments

Comments
 (0)