events: Move into main() method

This commit is contained in:
Adam Goldsmith 2018-06-01 13:51:50 -04:00
parent 07a7de5227
commit d62f0c16ab

View File

@ -59,6 +59,7 @@ def formatMessage(event):
att['newTime'],
" IN" if att['readerAddress'] == '0' else " OUT")
def main():
# get parameters for messages to get?
# honestly not really sure why this is required, their API is confusing
parXMLIn = ET.Element("VertXMessage")
@ -97,3 +98,6 @@ else:
for event in reversed(eventsXMLOut[0]):
root[0].insert(0, event)
tree.write("log.xml")
if __name__ == '__main__':
main()