FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 10-03-2011, 10:20 AM
Martin Gracik
 
Default Ignore remove errors

On some nfs mounts the shutil.rmtree may traceback
when removing some files. This is not such a problem
so we can ignore these errors and continue.
---
src/pylorax/yumhelper.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/pylorax/yumhelper.py b/src/pylorax/yumhelper.py
index 04ad140..904fdc2 100644
--- a/src/pylorax/yumhelper.py
+++ b/src/pylorax/yumhelper.py
@@ -117,7 +117,7 @@ class LoraxYumHelper(object):
if os.path.islink(fname) or os.path.isfile(fname):
os.unlink(fname)
else:
- shutil.rmtree(fname)
+ shutil.rmtree(fname, ignore_errors=True)

logger.debug("removed {0}".format(fname))
count += 1
--
1.7.3.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 06:36 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org