Skip to content

Commit

Permalink
Merge pull request #666 from davmlaw/issue_652_no_attribute_pool
Browse files Browse the repository at this point in the history
#652 - Fix for Error: AttributeError: 'UTA_postgresql' object has no attribute '_pool'
  • Loading branch information
reece committed Sep 10, 2023
2 parents 54e6839 + 2745a79 commit 2ad4dfa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hgvs/dataproviders/uta.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ def __init__(self, url, pooling=hgvs.global_config.uta.pooling, application_name
self.application_name = application_name
self.pooling = pooling
self._conn = None
self._pool = None
# If we're using connection pooling, track the set of DB
# connections we've seen; on first use we set the schema
# search path. Use weak references to avoid keeping connection
Expand All @@ -516,7 +517,8 @@ def __del__(self):

def close(self):
if self.pooling:
self._pool.closeall()
if self._pool is not None:
self._pool.closeall()
else:
if self._conn is not None:
self._conn.close()
Expand Down

0 comments on commit 2ad4dfa

Please sign in to comment.