diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-09-23 12:12:22 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2016-09-23 12:12:22 +0200 |
commit | 9cb7517443b8dc25596a3d3b1fb75f05380c1f19 (patch) | |
tree | 284ab851049f863c81ccff13660ea1c1cb6bd72e /whatmaps | |
parent | 92cace0d2a4d90f1e1cb1ac19c69a262b8cd8ed3 (diff) |
Don't abort if we can't parse a single package
so far we would abort the whole operation, skip the unreadable packages
instead and return with non-zero.
Diffstat (limited to 'whatmaps')
-rwxr-xr-x | whatmaps/command.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/whatmaps/command.py b/whatmaps/command.py index 913268c..8d0be31 100755 --- a/whatmaps/command.py +++ b/whatmaps/command.py @@ -132,6 +132,7 @@ def find_systemd_units(procmap, distro): def main(argv): shared_objects = [] services = None + ret = 0 parser = OptionParser(usage='%prog [options] pkg1 [pkg2 pkg3 pkg4]') parser.add_option("--debug", action="store_true", dest="debug", @@ -187,8 +188,8 @@ def main(argv): try: shared_objects += pkg.shared_objects except PkgError: - logging.error("Cannot parse contents of %s" % pkg.name) - return 1 + logging.error("Cannot parse contents of %s - skipping it" % pkg.name) + ret = 1 logging.debug("Found shared objects:") for so in shared_objects: logging.debug(" %s", so) @@ -240,7 +241,7 @@ def main(argv): for s in services: print(s) - return 0 + return ret def run(): |