Print operation no
This commit is contained in:
+1
-1
@@ -54,7 +54,7 @@ Lists previous operations."""
|
||||
|
||||
def print_history(self):
|
||||
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
|
||||
|
||||
|
||||
@@ -50,4 +50,5 @@ class HistoryDB(lazydb.LazyDB):
|
||||
count = count or len(self.__logs)
|
||||
for log in self.__logs[:count]:
|
||||
hist = pisi.history.History(os.path.join(ctx.config.history_dir(), log))
|
||||
hist.operation.no = int(log.split("_")[0])
|
||||
yield hist.operation
|
||||
|
||||
Reference in New Issue
Block a user