Changeset 823 for trunk/pgdb.py


Ignore:
Timestamp:
Feb 5, 2016, 4:35:34 PM (3 years ago)
Author:
cito
Message:

Raise the proper subclasses of DatabaseError?

Particularly, we raise IntegrityError? instead of ProgrammingError? for
duplicate keys. This also makes PyGreSQL more useable with SQLAlchemy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pgdb.py

    r822 r823  
    865865                except DatabaseError:
    866866                    raise  # database provides error message
    867                 except Exception as err:
     867                except Exception:
    868868                    raise _op_error("Can't start transaction")
    869869                self._dbcnx._tnx = True
Note: See TracChangeset for help on using the changeset viewer.