def add(self, project, cl_args, config): type = getClass("mailing", "mailman") if not type: raise ScalakError("Mailman add: no such service type. Please contact" \ "Scalak administrator.") name = None if len(cl_args) > 1: name = cl_args[1] project.addService(type(name)) print "List added"
def add(self, project, cl_args, config): if len(cl_args) < 2: raise ScalakError("Repository add: You have to supply repository " \ "type") type = getClass("repository", cl_args[1]) if not type: raise ScalakError("Repository add: no such repository type") name = None if len(cl_args) > 2: name = cl_args[2] project.addService(type(name)) print "Repository added"