cli.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:RPKI-toolkit 作者: pavel-odintsov 项目源码 文件源码
def onecmd(self, line):
    """
    Wrap error handling around cmd.Cmd.onecmd().  Might want to do
    something kinder than showing a traceback, eventually.
    """

    self.last_command_failed = False
    try:
      return cmd.Cmd.onecmd(self, line)
    except SystemExit:
      raise
    except ExitArgparse, e:
      if e.message is not None:
        print e.message
      self.last_command_failed = e.status != 0
      return False
    except BadCommandSyntax, e:
      print e
    except Exception:
      traceback.print_exc()
    self.last_command_failed = True
    return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号