If client called:
$ koji add-tag new-tag-name --parent nonexistent-tag
it failed with error:
xmlrpclib.Fault: <Fault 1: 'exceptions.TypeError: unsubscriptable
object'>
---
hub/kojihub.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hub/kojihub.py b/hub/kojihub.py
index f45bdf7..90c1263 100644
--- a/hub/kojihub.py
+++ b/hub/kojihub.py
@@ -2718,9 +2718,9 @@ def create_tag(name, parent=None, arches=None, perm=None,
locked=False, maven_su
# Does the parent exist?
if parent:
parent_tag = get_tag(parent)
- parent_id = parent_tag['id']
if not parent_tag:
raise koji.GenericError("Parent tag '%s' could not be
found" % parent)
+ parent_id = parent_tag['id']
else:
parent_id = None
--
1.9.3
Show replies by thread