Print operation no

This commit is contained in:
Faik Uygur
2008-02-19 12:29:21 +00:00
parent d790fc3950
commit a0da6826b9
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -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
+1
View File
@@ -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