--- a/cubicweb/server/sources/native.py Wed Apr 12 16:12:51 2017 +0200
+++ b/cubicweb/server/sources/native.py Wed Apr 12 16:14:10 2017 +0200
@@ -229,7 +229,7 @@
return self._create_eid(count)
else:
raise
- except Exception: # WTF?
+ except Exception: # WTF?
cnx.rollback()
self.cnx = None
source.exception('create eid failed in an unforeseen way on SQL statement %s', sql)
@@ -704,7 +704,7 @@
raise UniqueTogetherError(cnx, cstrname=mo.group(0))
# old sqlite
mo = re.search('columns? (.*) (?:is|are) not unique', arg)
- if mo is not None: # sqlite in use
+ if mo is not None: # sqlite in use
# we left chop the 'cw_' prefix of attribute names
rtypes = [c.strip()[3:]
for c in mo.group(1).split(',')]
@@ -1649,12 +1649,12 @@
self.logger.critical('Restore warning: versions do not match')
new_cubes = db_versions - archive_versions
if new_cubes:
- self.logger.critical('In the db:\n%s', '\n'.join('%s: %s' % (cube, ver)
- for cube, ver in sorted(new_cubes)))
+ self.logger.critical('In the db:\n%s', '\n'.join(
+ '%s: %s' % (cube, ver) for cube, ver in sorted(new_cubes)))
old_cubes = archive_versions - db_versions
if old_cubes:
- self.logger.critical('In the archive:\n%s', '\n'.join('%s: %s' % (cube, ver)
- for cube, ver in sorted(old_cubes)))
+ self.logger.critical('In the archive:\n%s', '\n'.join(
+ '%s: %s' % (cube, ver) for cube, ver in sorted(old_cubes)))
if not ASK.confirm('Versions mismatch: continue anyway ?', False):
raise ValueError('Unable to restore: versions do not match')
table_chunks = {}