def run_command(self): command = self.args.command try: res = commands.run(command, self.config, self.args) except UsageError, exc: self.log_error(exc, True, command) sys.exit(1)
def run_command(self): command = self.args.command try: res = commands.run(command, self.config, self.args) except UsageError as exc: self.log_error(exc, True, command) sys.exit(1) except FatalError as exc: traceback.print_exc() self.log_error(exc, True, command) except BuildStepError as exc: self.log_error(exc.msg, False, command) except AbortedError as exc: self.log_error('', False, command) except CerberoException as exc: self.log_error(exc, False, command) except KeyboardInterrupt: self.log_error(_('Interrupted')) except IOError as e: if e.errno != errno.EPIPE: raise sys.exit(0) if res: sys.exit(res)