Technologicat / pyan

Static call graph generator. The official Python 3 version. Development repo.
GNU General Public License v2.0
324 stars 57 forks source link

Check if list of file globs matches at least one file #34

Closed sirex closed 3 years ago

sirex commented 4 years ago

When given glob does not match any files, pyan3 exits without telling anything and generated an empty graph.

That might be confusing, when an incorrect file path is given. To avoid confusion, added additional check if glob matches at least one file.

Now it works like this:

> pyan3 --dot -f /tmp/graph.dot does/not/exist.py
Usage: pyan3 FILENAME... [--dot|--tgf|--yed]

pyan3: error: No files found matching given glob: does/not/exist.py
Technologicat commented 3 years ago

Merged. Thanks!