def print_history(self):
"""
Print database information to STDOUT
"""
try:
print("History of Nodes")
print("=========")
self.cur.execute("SELECT * FROM NodeStates ORDER BY datetime(Time) DESC")
rows = self.cur.fetchall()
for row in rows:
print("%s | %s | %s | '%s'" % (row[0], row[3], TrackNodes.decode_state(row[1]), row[2]))
print("")
except IOError as e:
if e.errno == errno.EPIPE:
# Perhaps output was piped to less and was quit prior to EOF
return
评论列表
文章目录