Skip to content

Commit

Permalink
Merge pull request #1424 from davemfish/bugfix/REC-close-db-conn
Browse files Browse the repository at this point in the history
REC: close a database connection
  • Loading branch information
emlys authored Oct 4, 2023
2 parents fd8fb7e + 178365f commit c65a20e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/natcap/invest/recreation/buffered_numpy_disk_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ def read(self, array_id):
"SELECT (array_path) FROM array_table where array_id=? LIMIT 1",
[array_id])
array_path = db_cursor.fetchone()
db_connection.close()

if array_path is not None:
array_data = numpy.load(array_path[0])
else:
Expand Down

0 comments on commit c65a20e

Please sign in to comment.