Fahey-McLay / xalt

28 stars 15 forks source link

Avoid division by zero errors #30

Closed treydock closed 6 years ago

treydock commented 6 years ago

The xalt_syslog_to_db.in.py changes avoid division by zero when a log file is empty. The change to xalt_usage_report.in.py was something I had to do during very early testing when database was empty and just wanted to test connectivity of usage script.

Replaces #27

rtmclay commented 6 years ago

I am handling the divide by zero in a slight different way. Please test 2.1.2 to see if it works for you.

treydock commented 6 years ago

@rtmclay Your changes appear to work. I ran createDb.py --drop and the usage script didn't error out and used xalt_syslog_to_db.py on an empty log file and no errors.