def TrySetAttribute(self, attribute, value):
    if attribute == 'loc':
      self.loc = self.Canonicalize(value)
    else:
      try:
        setattr(self, attribute, value)
      except AttributeError:
        output.Warn('Unknown URL attribute: %s' % attribute)
  #end def TrySetAttribute
Attempt to set the attribute to the value, with a pretty try
dataset/ETHPy150Open benoitc/restkit/doc/sitemap_gen.py/URL.TrySetAttribute