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

Commit 362b578

Browse files
committed
Merge pull request #723 from wking/index-db-results-close-session
docker_registry.lib.index.db: Close session in SQLAlchemyIndex.results
2 parents 376bcd3 + 44b49a9 commit 362b578

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

+3-1
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)