code: def validate_attachment_location(self, location):
          
          if not re.compile(self.valid_attachment_loc_re).match(location):
              raise ValueError(
                  'Bad chars in attachment location. Must match %s' % (
                      self.valid_attachment_loc_re))
docs: Validate a proposed attachment location.
  
          :arg location:     String representing location to put attachment.
  
          ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
  
          PURPOSE:   Raises an exception if attachment location is bad.
                     By default, this just forces reasonable characters.
                     Sub-classes can override as desired.