Skip to content

Commit

Permalink
Don't try to cache a generator
Browse files Browse the repository at this point in the history
  • Loading branch information
legoktm committed Jul 20, 2020
1 parent 38f4726 commit c5e0cd3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app.py
Expand Up @@ -33,8 +33,10 @@ def database_list():
databases = cursor.fetchall()
cursor.close()
conn.close()
ret = []
for database in databases:
yield database[0]
ret.append(database[0])
return ret


@cache.memoize(timeout=60*60*24)
Expand Down

0 comments on commit c5e0cd3

Please sign in to comment.