def add_service(self, service):
        """Add a service description.

        Handles transition from self.service=None, self.service=dict for a
        single service, and then self.service=[dict,dict,...] for multiple
        """
        if (self.service is None):
            self.service = service
        elif (isinstance(self.service, dict)):
            self.service = [self.service, service]
        else:
            self.service.append(service)
def add_service ( self , service ) : if ( self . service is None ) : self . service = service elif ( isinstance ( self . service , dict ) ) : self . service = [ self . service , service ] else : self . service . append ( service )
Add a service description.

        Handles transition from self.service=None, self.service=dict for a
        single service, and then self.service=[dict,dict,...] for multiple