Print operation no
This commit is contained in:
+1
-1
@@ -54,7 +54,7 @@ Lists previous operations."""
|
|||||||
|
|
||||||
def print_history(self):
|
def print_history(self):
|
||||||
for operation in self.historydb.get_last(ctx.get_option('last')):
|
for operation in self.historydb.get_last(ctx.get_option('last')):
|
||||||
print _("Operation: %s") % operation.type
|
print _("Operation #%03d: %s") % (operation.no, operation.type)
|
||||||
print _("Date: %s %s") % (operation.date, operation.time)
|
print _("Date: %s %s") % (operation.date, operation.time)
|
||||||
print
|
print
|
||||||
|
|
||||||
|
|||||||
@@ -50,4 +50,5 @@ class HistoryDB(lazydb.LazyDB):
|
|||||||
count = count or len(self.__logs)
|
count = count or len(self.__logs)
|
||||||
for log in self.__logs[:count]:
|
for log in self.__logs[:count]:
|
||||||
hist = pisi.history.History(os.path.join(ctx.config.history_dir(), log))
|
hist = pisi.history.History(os.path.join(ctx.config.history_dir(), log))
|
||||||
|
hist.operation.no = int(log.split("_")[0])
|
||||||
yield hist.operation
|
yield hist.operation
|
||||||
|
|||||||
Reference in New Issue
Block a user