Changeset 523


Ignore:
Timestamp:
Nov 7, 2015, 2:37:11 PM (4 years ago)
Author:
darcy
Message:

Use modern exception handling. Makes it ready for Python 3.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/module/pgdb.py

    r522 r523  
    354354        except DatabaseError:
    355355            raise
    356         except Error, err:
     356        except Error as err:
    357357            raise _db_error("error '%s' in '%s'" % (err, sql))
    358         except Exception, err:
     358        except Exception as err:
    359359            raise _op_error("internal error in '%s': %s" % (sql, err))
    360360        # then initialize result raw count and description
     
    403403        except DatabaseError:
    404404            raise
    405         except Error, err:
     405        except Error as err:
    406406            raise _db_error(str(err))
    407407        row_factory = self.row_factory
Note: See TracChangeset for help on using the changeset viewer.