pylint未定义变量来自'

发布于 2025-01-31 18:16:45 字数 757 浏览 0 评论 0原文

我遇到以下错误,我看不到有什么问题。

###############  Pylint errors ###############
****** /devwork/code.py:158:11: E0602 test: Undefined variable 'e' 
****** /devwork/code.py:159:23: E0602 test: Undefined variable 'e'
    def main():
        integration_logger = logging.getLogger('xxx')
        integration_logger.propogate = False
        LOG(f'Command is {command}')
        try:
            args = args()
            if command() == 'test-module':
                test()
            if command() == 'get-tree':
                results(get_tree(args))
        except Exception as e:     #158
            LOG(e)                 #159
            LOG.print_log()
            raise

I'm getting the following error, I can't see what is wrong.

###############  Pylint errors ###############
****** /devwork/code.py:158:11: E0602 test: Undefined variable 'e' 
****** /devwork/code.py:159:23: E0602 test: Undefined variable 'e'
    def main():
        integration_logger = logging.getLogger('xxx')
        integration_logger.propogate = False
        LOG(f'Command is {command}')
        try:
            args = args()
            if command() == 'test-module':
                test()
            if command() == 'get-tree':
                results(get_tree(args))
        except Exception as e:     #158
            LOG(e)                 #159
            LOG.print_log()
            raise

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文