summaryrefslogtreecommitdiff
path: root/Lib/distutils/dir_util.py
diff options
context:
space:
mode:
author?ric Araujo <merwok@netwok.org>2014-03-12 03:34:02 -0400
committer?ric Araujo <merwok@netwok.org>2014-03-12 03:34:02 -0400
commitdc4f601442495eb3919e28f64b230424789a0389 (patch)
tree9ab770d1b3cf54e4ed5969208bfda489ec13cd78 /Lib/distutils/dir_util.py
parent80ced3e7522ecc863fee732708d618ff6b645caa (diff)
downloadcpython-dc4f601442495eb3919e28f64b230424789a0389.tar.gz
Avoid ?error: None? messages from distutils (#4931).
Thanks to Amaury Forgeot d?Arc and Philip J. Eby.
Diffstat (limited to 'Lib/distutils/dir_util.py')
-rw-r--r--Lib/distutils/dir_util.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/distutils/dir_util.py b/Lib/distutils/dir_util.py
index 2826ff805d..6a72bdd4cd 100644
--- a/Lib/distutils/dir_util.py
+++ b/Lib/distutils/dir_util.py
@@ -2,7 +2,7 @@
Utility functions for manipulating directories and directory trees."""
-import os, sys
+import os
import errno
from distutils.errors import DistutilsFileError, DistutilsInternalError
from distutils import log
@@ -182,7 +182,6 @@ def remove_tree(directory, verbose=1, dry_run=0):
Any errors are ignored (apart from being reported to stdout if 'verbose'
is true).
"""
- from distutils.util import grok_environment_error
global _path_created
if verbose >= 1:
@@ -199,8 +198,7 @@ def remove_tree(directory, verbose=1, dry_run=0):
if abspath in _path_created:
del _path_created[abspath]
except (IOError, OSError) as exc:
- log.warn(grok_environment_error(
- exc, "error removing %s: " % directory))
+ log.warn("error removing %s: %s", directory, exc)
def ensure_relative(path):
"""Take the full path 'path', and make it a relative path.