Exemplo n.º 1
0
 def writestr(self, name, bytes):
     try:
         self.zip.writestr(name, bytes)
     except:
         log.x(_('Error writing file %(name)r to memory zip'),
               {'name': name})
         raise
Exemplo n.º 2
0
 def _runscript(self, version, name, cxn):
     try:
         cxn.executescript(self.desc[version][name])
     except sqlite3.OperationalError:
         # update scripts are tested, so the problem's seems to be sqlite
         # itself
         log.x(_('Exception while updating database schema.'))
         log.e(_('Database error. This is probably due to your version of'
                 ' sqlite being too old. Try updating sqlite3 and'
                 ' updating python. If the problem persists, you will need'
                 ' to delete the database at ' + self.db.dblocation))
         import sys
         sys.exit(1)
Exemplo n.º 3
0
 def writestr(self, name, bytes):
     try:
         self.zip.writestr(name, bytes)
     except:
         log.x(_('Error writing file %(name)r to memory zip'), {'name': name})
         raise