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 Build System

 
 
LinkBack Thread Tools
 
Old 04-14-2011, 05:24 PM
Chris Lumens
 
Default findFirstIsoImage needs to return a filename, so fix it.

It was previously returning a closed filehandle due to reuse of the "f"
variable.
---
pyanaconda/image.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/pyanaconda/image.py b/pyanaconda/image.py
index 180ac7f..90a264b 100644
--- a/pyanaconda/image.py
+++ b/pyanaconda/image.py
@@ -34,8 +34,8 @@ def findFirstIsoImage(path, messageWindow):
files = os.listdir(path)
arch = _arch

- for f in files:
- what = path + '/' + f
+ for fn in files:
+ what = path + '/' + fn
log.debug("Checking %s" % (what))
if not isys.isIsoImage(what):
continue
@@ -78,16 +78,16 @@ def findFirstIsoImage(path, messageWindow):
"

"
"It is recommended that you exit and abort your "
"installation, but you can choose to continue if "
- "you think this is in error.") % (f,),
+ "you think this is in error.") % (fn,),
type="custom", custom_icon="warning",
custom_buttons= [_("_Exit installer"),
_("_Continue")])
if rc == 0:
sys.exit(0)

- log.info("Found disc at %s" % f)
+ log.info("Found disc at %s" % fn)
isys.umount("/mnt/install/cdimage", removeDir=False)
- return f
+ return fn

return None

--
1.7.4.1

_______________________________________________
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 01:55 PM.

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