diff options
author | Brian Dolbec <dolsen@gentoo.org> | 2016-05-18 08:35:55 -0700 |
---|---|---|
committer | Brian Dolbec <dolsen@gentoo.org> | 2016-05-18 08:35:55 -0700 |
commit | ecd20fa451e72e03aacd41c297b47de896043a5f (patch) | |
tree | 56b316e62eb6684c6102f65ea617f3678a9e96a1 | |
parent | revdep-rebuild: Update man page to indicate -e option is only in the bash ver... (diff) | |
download | gentoolkit-ecd20fa451e72e03aacd41c297b47de896043a5f.tar.gz gentoolkit-ecd20fa451e72e03aacd41c297b47de896043a5f.tar.bz2 gentoolkit-ecd20fa451e72e03aacd41c297b47de896043a5f.zip |
revdep-rebuild, assign.py: Trap an invalid cpv split bug 571782
Added a check for parts not being valid None or empty list from the catpkgsplit(cpv) call.
It will now log the warning with the invalid cpv.
-rw-r--r-- | pym/gentoolkit/revdep_rebuild/assign.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pym/gentoolkit/revdep_rebuild/assign.py b/pym/gentoolkit/revdep_rebuild/assign.py index 412ed49..8d819d6 100644 --- a/pym/gentoolkit/revdep_rebuild/assign.py +++ b/pym/gentoolkit/revdep_rebuild/assign.py @@ -103,6 +103,11 @@ def get_slotted_cps(cpvs, logger): cps = [] for cpv in cpvs: parts = catpkgsplit(cpv) + if not parts: + logger.warn(('\t' + red("Failed to split the following pkg: " + "%s, not a valid cat/pkg-ver" %cpv))) + continue + cp = parts[0] + '/' + parts[1] try: slot = portdb.aux_get(cpv, ["SLOT"]) |