[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] verifyMedia can check without needing an older timestamp.



---
 image.py |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/image.py b/image.py
index 0b56c16..8b62877 100644
--- a/image.py
+++ b/image.py
@@ -268,7 +268,7 @@ def unmountCD(path, messageWindow):
                             "and then click OK to retry.")
                           % (path,))
 
-def verifyMedia(tree, discnum, timestamp):
+def verifyMedia(tree, discnum, timestamp=None):
     if os.access("%s/.discinfo" % tree, os.R_OK):
         f = open("%s/.discinfo" % tree)
 
@@ -290,7 +290,12 @@ def verifyMedia(tree, discnum, timestamp):
             discs = [ 0 ]
 
         f.close()
-        if (newStamp == timestamp and arch == _arch and discnum in discs):
-            return True
+
+        if timestamp is not None:
+            if newStamp == timestamp and arch == _arch and discnum in discs:
+                return True
+        else:
+            if arch == _arch and discnum in discs:
+                return True
 
     return False
-- 
1.5.5.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]