def create(self, command, project_name, cl_args, config): args,loose = getopt.getopt(cl_args, 'b:d:e:') args = dict(args) if len(loose) < 1: raise ScalakError("Create Error: at last administrators id must be supplied") admin = loose[0] brief = args.get('-b', None) desc = args.get('-d', None) # TODO checking date format due = args.get('-e', None) today = datetime.date.today().isoformat() project = Project(config, project_name, admin, today, due, brief, desc) project.create() project.addService(Trac()) project.addUser(admin)