Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit 44b49a9

Browse files
djlaidlawwking
authored andcommitted
docker_registry.lib.index.db: Close session in SQLAlchemyIndex.results
1 parent 376bcd3 commit 44b49a9

File tree

1 file changed

+3
-1
lines changed
  • docker_registry/lib/index

1 file changed

+3
-1
lines changed

docker_registry/lib/index/db.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,11 @@ def results(self, search_term=None):
123123
sqlalchemy.sql.or_(
124124
Repository.name.like(like_term),
125125
Repository.description.like(like_term)))
126-
return [
126+
results = [
127127
{
128128
'name': repo.name,
129129
'description': repo.description,
130130
}
131131
for repo in repositories]
132+
session.close()
133+
return results

0 commit comments

Comments
 (0)