Commit 21fab975 authored by Kirill Smelkov's avatar Kirill Smelkov

gpython: Fix thinko when rejecting unknown -X option

Before:

    (z-dev) kirr@deca:~/src/tools/go/pygolang$ gpython -X gpython.zzz
    Traceback (most recent call last):
      File "/home/kirr/src/wendelin/venv/z-dev/bin/gpython", line 3, in <module>
        from gpython import main; main()
      File "/home/kirr/src/tools/go/pygolang/gpython/__init__.py", line 397, in main
        raise RuntimeError('gpython: unknown -X option %s' % opt)
    RuntimeError: gpython: unknown -X option -X                                        <-- NOTE

After:

    (z-dev) kirr@deca:~/src/tools/go/pygolang$ gpython -X gpython.zzz
    Traceback (most recent call last):
      File "/home/kirr/src/wendelin/venv/z-dev/bin/gpython", line 3, in <module>
        from gpython import main; main()
      File "/home/kirr/src/tools/go/pygolang/gpython/__init__.py", line 397, in main
        raise RuntimeError('gpython: unknown -X option %s' % arg)
    RuntimeError: gpython: unknown -X option gpython.zzz                               <-- NOTE
parent 5716b130
...@@ -394,7 +394,7 @@ def main(): ...@@ -394,7 +394,7 @@ def main():
sys._xoptions['gpython.runtime'] = gpy_runtime sys._xoptions['gpython.runtime'] = gpy_runtime
else: else:
raise RuntimeError('gpython: unknown -X option %s' % opt) raise RuntimeError('gpython: unknown -X option %s' % arg)
continue continue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment