def restoreDatabase(version):
 logger.log(u'Restoring database before trying upgrade again')
 if (not sickbeard.helpers.restoreVersionedFile(dbFilename(suffix=('v' + str(version))), version)):
  logger.log_error_and_exit(u'Database restore failed, abort upgrading database')
  return False
 else:
  return True

def restoreDatabase ( version ) : logger . log ( u'Restoring database before trying upgrade again' ) if ( not sickbeard . helpers . restoreVersionedFile ( dbFilename ( suffix = ( 'v' + str ( version ) ) ) , version ) ) : logger . log_error_and_exit ( u'Database restore failed, abort upgrading database' ) return False else : return True
restores a database to a previous version .