Changeset 879 for trunk/pg.py


Ignore:
Timestamp:
Jul 23, 2016, 8:06:19 AM (3 years ago)
Author:
cito
Message:

Enable garbage collection after closing DB instance

Note that there is still a problem if the DB instance is not closed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pg.py

    r878 r879  
    14411441
    14421442    def __enter__(self):
    1443         """Enter the runtime context. This will start a transactio."""
     1443        """Enter the runtime context. This will start a transaction."""
    14441444        self.begin()
    14451445        return self
     
    15071507        if self._closeable:
    15081508            if self.db:
     1509                self.db.set_cast_hook(None)
    15091510                self.db.close()
    15101511                self.db = None
     
    15351536            db = connect(*self._args[0], **self._args[1])
    15361537            if self.db:
     1538                self.db.set_cast_hook(None)
    15371539                self.db.close()
    15381540            self.db = db
Note: See TracChangeset for help on using the changeset viewer.