diff options
author | Éric Araujo <merwok@netwok.org> | 2014-03-12 07:14:48 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2014-03-12 07:14:48 (GMT) |
commit | 3d1134e39551cd4277538f1fa9137fdf238d07fb (patch) | |
tree | 349a94426895913319aae76a14f85b2bd934f51e /Lib/distutils/dir_util.py | |
parent | fd0c2f5711d7a0495a74dcf4233990c571f47a57 (diff) | |
download | cpython-3d1134e39551cd4277538f1fa9137fdf238d07fb.zip cpython-3d1134e39551cd4277538f1fa9137fdf238d07fb.tar.gz cpython-3d1134e39551cd4277538f1fa9137fdf238d07fb.tar.bz2 |
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.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/distutils/dir_util.py b/Lib/distutils/dir_util.py index 5026e24..e2dc6f4 100644 --- a/Lib/distutils/dir_util.py +++ b/Lib/distutils/dir_util.py @@ -185,7 +185,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: @@ -202,8 +201,7 @@ def remove_tree(directory, verbose=1, dry_run=0): if abspath in _path_created: del _path_created[abspath] except (IOError, OSError), 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. |