예제 #1
0
파일: base.py 프로젝트: mitchellrj/yaybu
 def _do(self, action, config, *args):
     config_file = self._config(config)
     config_dir = os.path.dirname(config_file)
     p = OptionParser()
     y = YaybuCmd(config_file, ypath=(config_dir, ))
     y.Config = self.Config
     y.verbose = 2
     y.debug = True
     getattr(y, "opts_" + action)(p)
     return getattr(y, "do_" + action)(*p.parse_args(list(args)))
예제 #2
0
파일: base.py 프로젝트: yaybu/yaybu
 def _get_graph(self, config, *args):
     config_file = self._config(config)
     config_dir = os.path.dirname(config_file)
     p = OptionParser()
     y = YaybuCmd(config_file, ypath=(config_dir, ))
     y.Config = self.Config
     y.verbose = 2
     y.debug = True
     y.opts_up(p)
     return y._get_graph(*p.parse_args(list(args)))