[Python-projects] PyLint: False positive "Except doesn't do anything"

Maarten ter Huurne maarten.ter.huurne at philips.com
Thu Nov 23 17:06:47 CET 2006


Hi,

I was looking for a workaround for the problem reported in my previous 
mail when I tried this:
===
try:
        pass
except:
        pass # pylint: disable-msg=W0702
        print 'failed to do nothing'
===
PyLint reports "W0704:  3: Except doesn't do anything".

So it seems that if the first statement after "except" is "pass", that 
warning is issued, even if other statements follow the "pass".

PyLint 0.12.2, astng 0.16.3, common 0.21.0 (thanks for the new release!)

Bye,
                Maarten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.logilab.org/pipermail/python-projects/attachments/20061123/bc4c0608/attachment.html 


More information about the Python-Projects mailing list