def run(self, args): # Setup interrupt handler if available if self._interrupt: self.callbackOnInterrupt() # Look into the available hosts try: cfg = guitarlib.initialize(args) except SystemExit, e: # always return a non-zero exit code return e.code or 1
def main(argv = None): cfg = guitarlib.initialize(argv) # Load in the efg file efg_file = cfg.get('general', 'efg_file') log.info('loading efg file %s' % efg_file) gr = parser.load(efg_file) try: pkg, class_ = cfg.get('testgenerator', 'plugin').rsplit('.', 1) testgenerator = getattr(__import__(pkg, fromlist=[class_]), class_)() except (ImportError, AttributeError), e: log.exception(e) return 1