diff options
author | 2021-05-08 09:45:08 -0400 | |
---|---|---|
committer | 2022-07-08 19:44:08 -0700 | |
commit | 71c6d4d94a5bd5aac3fb090e2e306c278a83b954 (patch) | |
tree | 338f34e1a2eb2aec69d611e2ac884feee0f73bc9 /bin | |
parent | Add -f/--forced-masked to equery(1) (diff) | |
download | gentoolkit-71c6d4d94a5bd5aac3fb090e2e306c278a83b954.tar.gz gentoolkit-71c6d4d94a5bd5aac3fb090e2e306c278a83b954.tar.bz2 gentoolkit-71c6d4d94a5bd5aac3fb090e2e306c278a83b954.zip |
metadata.py: Don't fail on unmatched package
Added a warning hook too to reuse the GentoolkitNoMatches machinery
This allows users to do something like:
equery list @selected | xargs equery metadata
successfuly, even if there are some selected packages that don't exist
anymore.
Signed-off-by: Marco Sirabella <marco@sirabella.org>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/equery | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -29,6 +29,16 @@ except KeyboardInterrupt: sys.exit(1) from gentoolkit import equery, errors +import warnings + + +def formatwarning(message, category, filename, llineno, line=None): + from gentoolkit import pprinter as pp + return pp.warn(str(message)) + + +if '--debug' not in sys.argv and not bool(os.getenv('DEBUG', False)): + warnings.formatwarning = formatwarning try: equery.main(sys.argv) |