SVN: security/cve_reader.py
megabajt
megabajt at pld-linux.org
Sun Oct 7 00:28:40 CEST 2007
Author: megabajt
Date: Sun Oct 7 00:28:40 2007
New Revision: 8797
Modified:
security/cve_reader.py
Log:
- don't fail when size_f doesn't exists
Modified: security/cve_reader.py
==============================================================================
--- security/cve_reader.py (original)
+++ security/cve_reader.py Sun Oct 7 00:28:40 2007
@@ -32,10 +32,14 @@
# Main parse function
def parse():
# seek where we last ended parsing
- f2 = open(size_f, 'r')
- old_size = f2.read().split("L")
- old_size = long(old_size[0])
- f2.close()
+ if os.path.isfile(size_f):
+ f2 = open(size_f, 'r')
+ old_size = f2.read().split("L")
+ old_size = long(old_size[0])
+ f2.close()
+ else:
+ old_size = 0
+
f = open(log)
f.seek(old_size) # end seeking
read = f.xreadlines()
More information about the pld-cvs-commit
mailing list