def LogApplicationUsage(self, event, bundle_id, app_version, app_path):
    if bundle_id is None and app_version is None and app_path is None:
      return

    try:
      now = int(time.time())
      conn = self._Connect()
      if not self._DetectApplicationUsageTable(conn):
        self._CreateApplicationUsageTable(conn)
      self._InsertApplicationUsage(
          conn,
          event, bundle_id, app_version, app_path, now)
      conn.commit()
    except sqlite3.OperationalError, e:
      logging.error('Error writing %s event to database: %s', event, e)
      self._Close(conn)
    except sqlite3.DatabaseError, e:
      if e.args[0] == 'database disk image is malformed':
        self._RecreateDatabase()
      logging.error('Database error: %s', e)
      self._Close(conn)
    self._Close(conn)
Move torrent data to location.
dataset/ETHPy150Open google/macops/crankd/ApplicationUsage.py/ApplicationUsage.LogApplicationUsage--crossover with--dataset/ETHPy150Open correl/Transmission-XBMC/resources/lib/transmissionrpc/torrent.py/Torrent.move_data