aboutsummaryrefslogtreecommitdiff
path: root/src/vgstash
diff options
context:
space:
mode:
Diffstat (limited to 'src/vgstash')
-rwxr-xr-xsrc/vgstash/__init__.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/vgstash/__init__.py b/src/vgstash/__init__.py
index e3ede03..b3bd9b9 100755
--- a/src/vgstash/__init__.py
+++ b/src/vgstash/__init__.py
@@ -277,9 +277,17 @@ class DB(object):
return ret
def list_games(self, filter='allgames'):
+ """
+ Return a list of games that meet the filter criteria.
+
+ If the filter exists, it returns a list of sqlite3.Row objects. If the
+ filter does not exist, it returns False. If no filter is specified, it
+ will return a list of all games in the database.
+ """
if filter not in FILTERS.keys():
- filter = 'allgames'
- return self.conn.execute(FILTERS[filter]).fetchall()
+ return False
+ else:
+ return self.conn.execute(FILTERS[filter]).fetchall()
def update_filter(self, filter_name, stmt):
"""