Skip to content

python-modernize -f foobar raises an IndexError #195

Open
@ngie-eign

Description

It looks like there's a bug in the code involved with printing out an error message about the option passed to -f being an invalid fixer:

$ python-modernize -f lib2to3.fixes.long -w ...
Loading the following fixers:
Traceback (most recent call last):
  File "/home/ecooper/.local/bin/python-modernize", line 10, in <module>
    sys.exit(main())
  File "/home/ecooper/.local/lib/python2.7/site-packages/libmodernize/main.py", line 171, in main
    print("    {}  ({})".format(fixname, fixname.split(".fix_", 1)[1]), file=sys.stderr)
IndexError: list index out of range
$ python-modernize --version
modernize 0.7.0
$

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions