Kaydet (Commit) 30ac20ef authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

Nedeni bilinmeyen (en az-±ndan anlamak için yeterli bilgim yoktu) historydb hatas-± fixe edildi

üst 1929b7cf
......@@ -151,6 +151,6 @@ class History(xmlfile.XmlFile, metaclass=autoxml.autoxml):
return "0o01"
#files.sort(key=lambda x,y:int(x.split("_")[0]) - int(y.split("_")[0]))
files.sort(key=lambda x:int(x.split("_")[0]))
no, osxml = files[-1].split("_")
files.sort(key=lambda x:int(x.split("_")[0].replace("0o","0")))
no, osxml = files[-1].replace("0o","0").split("_")
return "%03d" % (int(no) + 1)
......@@ -28,7 +28,7 @@ class HistoryDB(lazydb.LazyDB):
def __generate_history(self):
logs = [x for x in os.listdir(ctx.config.history_dir()) if x.endswith(".xml")]
#logs.sort(key=lambda x,y:int(x.split("_")[0]) - int(y.split("_")[0]))
logs.sort(key=lambda x:int(x.split("_")[0]))
logs.sort(key=lambda x:int(x.split("_")[0].replace("0o","0")))
logs.reverse()
return logs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment