Dotan Barak on python-projects: I have the following function in my code
import os
import shutil
def clear_temp_folder(temp_path):
""" Remove old temporary folder if exists."""
if os.path.exists(temp_path):
try:
shutil.rmtree(temp_path)
rc = 0
except OSError:
rc = 1
if rc:
print "Error, failed to remove old temporary path %s" % temp_path
return rc
return rc:
From doing code review by eye, i found out that the variable rc can be returned without any initialization, but the pylint could not find it. | |
| priority | normal |
|---|---|
| type | bug |
| appeared in | <not specified> |
| done in | <not specified> |
| load | 1.000 |
| load left | 1.000 |
| closed by | <not specified> |


#8350 C0322 false positive on multi-line string
Comments
-
2009/03/09 11:19, written by sthenault
| reply to this comment
(add comment)see also http://lists.logilab.org/pipermail/python-projects/2009-February/001689.html