forked from M-Labs/artiq
1
0
Fork 0

artiq_run: sort result output alphabetically

This commit is contained in:
Sebastien Bourdeauducq 2015-02-17 16:12:21 -07:00
parent 614a96a3d7
commit 656099a331
1 changed files with 3 additions and 2 deletions

View File

@ -123,8 +123,9 @@ def main():
else: else:
if rdb.data.read or rdb.realtime_data.read: if rdb.data.read or rdb.realtime_data.read:
print("Results:") print("Results:")
for k, v in chain(rdb.realtime_data.read.items(), for k, v in sorted(chain(rdb.realtime_data.read.items(),
rdb.data.read.items()): rdb.data.read.items()),
key=itemgetter(0)):
print("{}: {}".format(k, v)) print("{}: {}".format(k, v))
finally: finally:
dbh.close() dbh.close()