# HG changeset patch # User dwinter # Date 1382619525 -7200 # Node ID e13200d8d47321b0096a1f27819bfecb52c03324 # Parent cfb5bb05253a78afaf373b8fc18f78324c5767bc getTags retruns now None if there aren't any diff -r cfb5bb05253a -r e13200d8d473 .pydevproject --- a/.pydevproject Thu Oct 24 14:46:22 2013 +0200 +++ b/.pydevproject Thu Oct 24 14:58:45 2013 +0200 @@ -2,8 +2,8 @@ -python2.4 - zope -python 2.4 +Default +python 2.7 /MPIWGThesaurus diff -r cfb5bb05253a -r e13200d8d473 MPIWGThesaurus.py --- a/MPIWGThesaurus.py Thu Oct 24 14:46:22 2013 +0200 +++ b/MPIWGThesaurus.py Thu Oct 24 14:58:45 2013 +0200 @@ -713,9 +713,10 @@ def getTagsAsHash(self,projectID,tagType=None): - """get all tags""" + """get all tags as hash or None if no tag exists""" retHash={} + tagCnt=0 tags = getattr(self,"tags",None) if tags is None: @@ -740,9 +741,12 @@ if currentTag is None: continue if currentTag.has_key(projectID): + tagCnt+=1 retHash[tagType].append("""%s"""%tag) - logging.debug(retHash) + if tagCnt==0: + return None + return retHash