From f2d3b09b3287f52c1e9cd8ffa6c39585a9315dae Mon Sep 17 00:00:00 2001 From: fuzzyray Date: Fri, 22 Aug 2008 21:14:36 +0000 Subject: [PATCH] Fix gentoolkit.split_package_name to work when portage.catpkgsplit returns None svn path=/; revision=506 --- trunk/src/gentoolkit/helpers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/trunk/src/gentoolkit/helpers.py b/trunk/src/gentoolkit/helpers.py index 595bee3..6dba7db 100644 --- a/trunk/src/gentoolkit/helpers.py +++ b/trunk/src/gentoolkit/helpers.py @@ -130,13 +130,15 @@ def split_package_name(name): """Returns a list on the form [category, name, version, revision]. Revision will be 'r0' if none can be inferred. Category and version will be empty, if none can be inferred.""" - r = list(portage.catpkgsplit(name)) + r = portage.catpkgsplit(name) if not r: r = name.split("/") if len(r) == 1: return ["", name, "", "r0"] else: return r + ["", "r0"] + else: + r = list(r) if r[0] == 'null': r[0] = '' return r -- 2.26.2