summaryrefslogtreecommitdiff
path: root/service/pixelated
diff options
context:
space:
mode:
authorPatrick Maia and Victor Shyba <pixelated-team+pmaia+vshyba@thoughtworks.com>2014-09-07 17:05:02 +0000
committerPatrick Maia <pmaia@thoughtworks.com>2014-09-07 17:05:02 +0000
commit2b04f7a243b2c8c68f45dd60efdc5c38249ac220 (patch)
tree72df2a1fad6d44adcdca5bf51a0b7c96005f010b /service/pixelated
parent49dfdf8ad54860ba5b518681f17574b86054d384 (diff)
#51 - adds method TagIndex.empty
Diffstat (limited to 'service/pixelated')
-rw-r--r--service/pixelated/adapter/tag_index.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/service/pixelated/adapter/tag_index.py b/service/pixelated/adapter/tag_index.py
index ea69be1a..bac3c6a6 100644
--- a/service/pixelated/adapter/tag_index.py
+++ b/service/pixelated/adapter/tag_index.py
@@ -44,6 +44,9 @@ class TagIndex:
else:
return None
+ def empty(self):
+ return len(self.db.keys()) == 0
+
def values(self):
return set(self.get(key) for key in self.db.keys())