Fix 999+ bug of pisi hs

This commit is contained in:
Faik Uygur
2008-08-04 09:19:23 +00:00
parent 3bc0729005
commit 6708eb9e7e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ class HistoryDB(lazydb.LazyDB):
def __generate_history(self):
logs = filter(lambda x:x.endswith(".xml"), os.listdir(ctx.config.history_dir()))
logs.sort()
logs.sort(lambda x,y:int(x.split("_")[0]) - int(y.split("_")[0]))
logs.reverse()
return logs
+1 -1
View File
@@ -126,6 +126,6 @@ class History(xmlfile.XmlFile):
if not files:
return "001"
files.sort()
files.sort(lambda x,y:int(x.split("_")[0]) - int(y.split("_")[0]))
no, opxml = files[-1].split("_")
return "%03d" % (int(no) + 1)