diff options
Diffstat (limited to 'pypy/interpreter/app_main.py')
-rwxr-xr-x | pypy/interpreter/app_main.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pypy/interpreter/app_main.py b/pypy/interpreter/app_main.py index 824131e9ed..da045412b1 100755 --- a/pypy/interpreter/app_main.py +++ b/pypy/interpreter/app_main.py @@ -572,7 +572,11 @@ def parse_command_line(argv): if WE_ARE_TRANSLATED: flags = [options[flag] for flag in sys_flags] - sys.flags = type(sys.flags)(flags) + oldflags = sys.flags + # hack: delete the flags first to make sure they don't turn into an + # cell in the celldict + del sys.flags + sys.flags = type(oldflags)(flags) sys.py3kwarning = bool(sys.flags.py3k_warning) sys.dont_write_bytecode = bool(sys.flags.dont_write_bytecode) |