diff options
author | Patrick Maia and Victor Shyba <pixelated-team+pmaia+vshyba@thoughtworks.com> | 2014-09-07 23:02:26 +0000 |
---|---|---|
committer | Patrick Maia <pmaia@thoughtworks.com> | 2014-09-07 23:02:26 +0000 |
commit | eca2d8db9fa967b4cad39611fe229e2f9421c9fe (patch) | |
tree | 0a47d9ed2d52b4271937ace738b2a502bb5a4020 /service/pixelated | |
parent | 733f2b7d6c76ac917720a4b4874c8165e8f34f5a (diff) |
#51 - adds TagIndex.remove method
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/adapter/tag_index.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/service/pixelated/adapter/tag_index.py b/service/pixelated/adapter/tag_index.py index bac3c6a6..743c74e1 100644 --- a/service/pixelated/adapter/tag_index.py +++ b/service/pixelated/adapter/tag_index.py @@ -44,6 +44,10 @@ class TagIndex: else: return None + def remove(self, tag_name): + if tag_name in self.db: + del self.db[tag_name] + def empty(self): return len(self.db.keys()) == 0 |