Fix 999+ bug of pisi hs
This commit is contained in:
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user