Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Directory (http://www.linux-archive.org/fedora-directory/)
-   -   verifyMedia no longer looks at the disc number. (http://www.linux-archive.org/fedora-directory/444910-verifymedia-no-longer-looks-disc-number.html)

Chris Lumens 10-27-2010 05:10 PM

verifyMedia no longer looks at the disc number.
 
---
pyanaconda/image.py | 13 ++++---------
pyanaconda/yuminstall.py | 4 ++--
2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/pyanaconda/image.py b/pyanaconda/image.py
index 4a36bbe..1b2a5bc 100644
--- a/pyanaconda/image.py
+++ b/pyanaconda/image.py
@@ -255,7 +255,7 @@ def scanForMedia(tree, storage):
except:
continue

- if not verifyMedia(tree, 1):
+ if not verifyMedia(tree):
dev.format.unmount()
continue

@@ -284,7 +284,7 @@ def unmountCD(dev, messageWindow):
"and then click OK to retry.")
% (dev.path,))

-def verifyMedia(tree, discnum, timestamp=None):
+def verifyMedia(tree, timestamp=None):
if os.access("%s/.discinfo" % tree, os.R_OK):
f = open("%s/.discinfo" % tree)

@@ -300,18 +300,13 @@ def verifyMedia(tree, discnum, timestamp=None):
except:
arch = None

- try:
- discs = getDiscNums(f.readline().strip())
- except:
- discs = [ 0 ]
-
f.close()

if timestamp is not None:
- if newStamp == timestamp and arch == _arch and discnum in discs:
+ if newStamp == timestamp and arch == _arch:
return True
else:
- if arch == _arch and discnum in discs:
+ if arch == _arch:
return True

return False
diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py
index b52f37c..eca00e5 100644
--- a/pyanaconda/yuminstall.py
+++ b/pyanaconda/yuminstall.py
@@ -397,7 +397,7 @@ class AnacondaYum(YumSorter):
try:
dev.format.mount()

- if verifyMedia(self.tree, discnum, None):
+ if verifyMedia(self.tree, None):
self.currentMedia = discnum
return

@@ -421,7 +421,7 @@ class AnacondaYum(YumSorter):
try:
dev.format.mount()

- if verifyMedia(self.tree, discnum, self._timestamp):
+ if verifyMedia(self.tree, self._timestamp):
self.currentMedia = discnum
break

--
1.7.1.1

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

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