def generate_structure(self): path = self.params.path if path[0] != "/": path = os.path.abspath(os.getcwd() + "/" + self.params.path) name = path.split("/")[-1] if os.path.exists(path): raise AttributeError("Path %s is already present." % path) CommandFactory.get(command="GenerateStructure").run(name, path)
def run_command(self): command = CommandFactory.get(command=self.params.command, command_type=self.params.command_type) command.run(self.params)