Follow PEP-0249 for Transaction and backends

This commit is contained in:
jmartin 2016-03-10 13:34:53 +01:00
parent 6e3a637751
commit 3fc36ffe7d
1 changed files with 2 additions and 2 deletions

View File

@ -165,7 +165,7 @@ class CSVArchive(Workflow, ModelSQL, ModelView):
})
def get_data(self, name):
cursor = Transaction().cursor
cursor = Transaction().connection.cursor()
path = os.path.join(config.get('database', 'path'),
cursor.database_name, 'csv_import')
archive = '%s/%s' % (path, self.archive_name.replace(' ', '_'))
@ -180,7 +180,7 @@ class CSVArchive(Workflow, ModelSQL, ModelView):
@classmethod
def set_data(cls, archives, name, value):
cursor = Transaction().cursor
cursor = Transaction().connection.cursor()
path = os.path.join(config.get('database', 'path'),
cursor.database_name, 'csv_import')
if not os.path.exists(path):