Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Development (http://www.linux-archive.org/debian-development/)
-   -   Don't try to unlink a config file that isn't there. (http://www.linux-archive.org/debian-development/497256-dont-try-unlink-config-file-isnt-there.html)

David Lehman 03-04-2011 05:45 PM

Don't try to unlink a config file that isn't there.
 
---
pyanaconda/storage/devicetree.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index ca46a8d..1e17a46 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -1733,7 +1733,7 @@ class DeviceTree(object):
except (IOError, OSError) as e:
msg = str(e)
log.error("failed to %s of %s: %s" % (op, cfg, msg))
- elif restore:
+ elif restore and os.access(cfg, os.W_OK):
# remove the config since we created it
log.info("removing anaconda-created %s" % cfg)
try:
--
1.7.3.5

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


All times are GMT. The time now is 06:56 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.