• Julien Muchembled's avatar
    logger: do not leave sqlite transaction open · f77a685d
    Julien Muchembled authored
    This should fix the following failure:
    
    Traceback (most recent call last):
      File "bin/neostorage", line 23, in <module>
        neo.scripts.neostorage.main()
      File "neoppod/neo/scripts/neostorage.py", line 80, in main
        app.run()
      File "neoppod/neo/storage/app.py", line 167, in run
        logging.exception('Pre-mortem data:')
      File "/usr/lib/python2.6/logging/__init__.py", line 1088, in exception
        self.error(*((msg,) + args), **{'exc_info': 1})
      File "/usr/lib/python2.6/logging/__init__.py", line 1082, in error
        self._log(ERROR, msg, args, **kwargs)
      File "/usr/lib/python2.6/logging/__init__.py", line 1173, in _log
        self.handle(record)
      File "/usr/lib/python2.6/logging/__init__.py", line 1183, in handle
        self.callHandlers(record)
      File "neoppod/neo/lib/logger.py", line 210, in callHandlers
        self._queue(record)
      File "neoppod/neo/lib/logger.py", line 200, in _queue
        self._release()
      File "neoppod/neo/lib/logger.py", line 79, in _release
        self._async.pop()(self)
      File "neoppod/neo/lib/logger.py", line 96, in flush
        self.db.execute("BEGIN")
    sqlite3.OperationalError: cannot start a transaction within a transaction
    f77a685d
logger.py 8.19 KB