extras-repoclosure rc-report.py,1.14,1.15

Michael Schwendt (mschwendt) fedora-extras-commits at redhat.com
Sun Aug 27 08:05:03 UTC 2006


Author: mschwendt

Update of /cvs/fedora/extras-repoclosure
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7031

Modified Files:
	rc-report.py 
Log Message:
make startable with empty history dbs


Index: rc-report.py
===================================================================
RCS file: /cvs/fedora/extras-repoclosure/rc-report.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- rc-report.py	29 Jul 2006 22:10:23 -0000	1.14
+++ rc-report.py	27 Aug 2006 08:05:00 -0000	1.15
@@ -35,13 +35,18 @@
 # them more than once until expiration.
 class History:
 
-    history = {}
-    incoming = {}
-    expired = {}
+    def _reset(self):
+        self.history = {}
+        self.incoming = {}
+        self.expired = {}
 
     def __init__(self,release): # Load history map file and expire its contents.
+        self._reset()
         self.historyname = 'history-%s.pickle' % release
-        f = file(self.historyname,'r')
+        try:
+            f = file(self.historyname,'r')
+        except:
+            return
         self.tmpdict = pickle.load(f)
         f.close()
         # Build up history/expired dicts.




More information about the scm-commits mailing list