diff options
-rw-r--r-- | Lib/shutil.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py index 10b7a27767..fde8c90fe9 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -128,6 +128,7 @@ def rmtree(path, ignore_errors=False, onerror=None): cmdtuples = [] arg = path try: + func = os.listdir # Make sure it isn't unset _build_cmdtuple(path, cmdtuples) for func, arg in cmdtuples: func(arg) |