• Kirill Smelkov's avatar
    gpython: Fix thinko when rejecting unknown -X option · c3deb6a3
    Kirill Smelkov authored
    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
    
    /proposed-for-review-on !25
    c3deb6a3
__init__.py 20.1 KB