Only open DB connection when needed.

This commit is contained in:
Michael Herzberg 2018-08-02 12:37:57 +01:00
parent 05c1cbdea5
commit 66db569d5f
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ class MysqlBackend:
self.cursor = None
def __enter__(self):
self._create_conn()
# We open a connection once we actually need it
return self
def __exit__(self, *args):