[sqlite] Fix integrity error parsing
Up to sqlite 3.7, integrity error message may be in the singular form
if only one column is in the unique index.
Closes #5224632
--- a/server/sources/native.py Mon Apr 06 21:46:52 2015 +0200
+++ b/server/sources/native.py Tue Apr 07 17:08:53 2015 +0200
@@ -736,7 +736,7 @@
if mo is not None:
raise UniqueTogetherError(cnx, cstrname=mo.group(0))
# old sqlite
- mo = re.search('columns (.*) are not unique', arg)
+ mo = re.search('columns? (.*) (?:is|are) not unique', arg)
if mo is not None: # sqlite in use
# we left chop the 'cw_' prefix of attribute names
rtypes = [c.strip()[3:]