def WriteComputerMSULog(uuid, details):
  """Write log details from MSU GUI into ComputerMSULog model.

  Args:
    uuid: str, computer uuid to update
    details: dict like = {
      'event': str, 'something_happened',
      'source': str, 'MSU' or 'user',
      'user': str, 'username',
      'time': int, epoch seconds,
      'desc': str, 'additional descriptive text',
    }
  """
  uuid = common.SanitizeUUID(uuid)
  key = (uuid, details['source'], details['event']) % '%s_%s_%s'
  c = models.ComputerMSULog(key_name=key)
  c.uuid = uuid
  c.event = details['event']
  c.source = details['source']
  c.user = details['user']
  c.desc = details['desc']
  try:
    mtime = util.Datetime.utcfromtimestamp(details.get('time', None))
  except ValueError, e:
    logging.warning('Ignoring msu_log time; %s' % str(e))
    mtime = datetime.datetime.utcnow()
  except util.EpochExtremeFutureValueError, e:
    logging.warning('Ignoring msu_log time; %s' % str(e))
    mtime = datetime.datetime.utcnow()
  except util.EpochValueError:
    mtime = datetime.datetime.utcnow()
  if c.mtime is None or mtime > c.mtime:
    c.mtime = mtime
    c.put()
dataset/ETHPy150Open google/simian/src/simian/mac/munki/common.py/WriteComputerMSULog/swapped operands of `%`