Commit 459093cf authored by harua8n's avatar harua8n Committed by oroulet

print_history checking for incorrect type

Argument passed to print_history is a list instead of ua.HistoryData.
parent 136a7aca
......@@ -595,10 +595,9 @@ def uadiscover():
def print_history(o):
if isinstance(o, ua.HistoryData):
print("{0:30} {1:10} {2}".format('Source timestamp', 'Status', 'Value'))
for d in o.DataValues:
print("{0:30} {1:10} {2}".format(str(d.SourceTimestamp), d.StatusCode.name, d.Value))
print("{0:30} {1:10} {2}".format('Source timestamp', 'Status', 'Value'))
for d in o:
print("{0:30} {1:10} {2}".format(str(d.SourceTimestamp), d.StatusCode.name, d.Value.Value))
def str_to_datetime(s, default=None):
......
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