Project

General

Profile

« Previous | Next » 

Revision 2373

sql.py: run_query(): FunctionValueException: Unpack match.groups() into vars to make code clearer

View differences:

lib/sql.py
371 371
        match = re.search(r'invalid input (?:syntax|value)\b.*?: "(.+?)"\n'
372 372
            r'(?:(?s).*?)\bfunction "(\w+?)".*?\bat assignment', msg)
373 373
        if match:
374
            raise FunctionValueException(match.group(2),
375
                strings.to_unicode(match.group(1)), e)
374
            value, name = match.groups()
375
            raise FunctionValueException(name, strings.to_unicode(value), e)
376 376
        
377 377
        match = re.search(r'relation "(\w+?)" already exists', msg)
378 378
        if match: raise DuplicateTableException(match.group(1), e)

Also available in: Unified diff