[Python-projects] pylint version 0.16.0 doesn't complain about uninitialized variable

Dotan Barak dotanba at gmail.com
Thu Mar 5 10:07:23 CET 2009


Hi.

I have the following function in my code:

<--snip start-->
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
<--snip end-->




More information about the Python-Projects mailing list