closing db cursor

This commit is contained in:
voje 2019-05-01 18:38:35 +02:00
parent ba72802f1f
commit 707034153c

View File

@ -256,6 +256,7 @@ def api_get_frames():
frames = []
for ent in cur[:QUERY_LIMIT]:
frames += frames_from_db_entry(ent) # pre-process this step for prod TODO
cur.close()
# filter by relevant hw
frames = [x for x in frames if x.hw == hw]
@ -308,6 +309,7 @@ def api_get_functor_frames():
frames = []
for ent in cur[:QUERY_LIMIT]:
frames += frames_from_db_entry(ent) # pre-process this step for prod TODO
cur.close()
# filter by relevant functor
frames = [x for x in frames if functor in x.get_functors()]