mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Catch errors from 'rmtree' and emit a warning.
This commit is contained in:
parent
88f6ca2ce9
commit
ad83f04086
1 changed files with 10 additions and 2 deletions
|
@ -402,8 +402,16 @@ class Dist (Command):
|
|||
|
||||
|
||||
def nuke_release_tree (self, base_dir):
|
||||
self.execute (rmtree, (base_dir,),
|
||||
"removing %s" % base_dir)
|
||||
try:
|
||||
self.execute (rmtree, (base_dir,),
|
||||
"removing %s" % base_dir)
|
||||
except (IOError, OSError), exc:
|
||||
if exc.filename:
|
||||
msg = "error removing %s: %s (%s)" % \
|
||||
(base_dir, exc.strerror, exc.filename)
|
||||
else:
|
||||
msg = "error removing %s: %s" % (base_dir, exc.strerror)
|
||||
self.warn (msg)
|
||||
|
||||
|
||||
def make_tarball (self, base_dir, compress="gzip"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue