Skip to content

manly crashes if manpage is not english #31

@carlbordum

Description

@carlbordum

Issue #30 made me realise that manly only works on english man pages. Luckily it appears to only be the case, because of the regex here https://github.com/carlbordum/manly/blob/master/manly.py#L154 that parses the title/NAME.

Currently it crashes with the rather cryptic error

Traceback (most recent call last):
  File "manly.py", line 191, in <module>
    main()
  File "manly.py", line 180, in main
    title, output = manly(args.command)
  File "manly.py", line 151, in manly
    re.search(r"(?<=^NAME\n\s{5}).+", manpage, re.MULTILINE).group(0).strip()
AttributeError: 'NoneType' object has no attribute 'group'

All ideas welcome. What are the different approaches to handle this?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions