From b145700207bf4ee1c1467616735cb29eb2ed89ed Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Feb 27 2015 13:14:09 +0000 Subject: Raise an exception when adding a duplicate tag Instead of changing the return message --- diff --git a/progit/lib/__init__.py b/progit/lib/__init__.py index 3354319..e86fd7f 100644 --- a/progit/lib/__init__.py +++ b/progit/lib/__init__.py @@ -166,7 +166,8 @@ def add_issue_tag(session, issue, tag, user, ticketfolder): for tag_issue in issue.tags: if tag_issue.tag == tag: - return 'Tag already present: %s' % tag + raise progit.exceptions.ProgitException( + 'Tag already present: %s' % tag) tagobj = get_tag(session, tag) if not tagobj: