From: Nick Coghlan Date: Fri, 18 Oct 2013 12:39:50 +0000 (+1000) Subject: Close #19284: Handle -R properly in flag helper X-Git-Tag: v3.4.0a4~66 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ac1a2489681d16ecc92985aefbd944e3b70fd26f;p=thirdparty%2FPython%2Fcpython.git Close #19284: Handle -R properly in flag helper Previously, the -R option would be specified multiple times if PYTHONHASHSEED was set. --- diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 4ce3c929d6b7..23c9ea515b2d 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -506,6 +506,8 @@ def _args_from_interpreter_flags(): for flag, opt in flag_opt_map.items(): v = getattr(sys.flags, flag) if v > 0: + if flag == 'hash_randomization': + v = 1 # Handle specification of an exact seed args.append('-' + opt * v) for opt in sys.warnoptions: args.append('-W' + opt)