~jseutter/storm/py3_exceptions

« back to all changes in this revision

Viewing changes to storm/databases/sqlite.py

  • Committer: Jerry Seutter
  • Date: 2012-05-09 12:57:22 UTC
  • Revision ID: jerry.seutter@canonical.com-20120509125722-oy6yirqz07mq7qew
try..except blocks that are compatible with Python 2 and Python 3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
152
152
        while True:
153
153
            try:
154
154
                return Connection.raw_execute(self, statement, params)
155
 
            except sqlite.OperationalError, e:
 
155
            except sqlite.OperationalError as e:
156
156
                if str(e) != "database is locked":
157
157
                    raise
158
158
                elif now() - started < self._database._timeout: