bitly / data_hacks

Command line utilities for data analysis
http://github.com/bitly/data_hacks
1.94k stars 195 forks source link

fix exception handle #33

Closed tnxbutno closed 8 years ago

tnxbutno commented 8 years ago

If you pipe invalid input to ninety_five_percent.py before my changes:
ninety_five_percent.py", line 40, in run data[t] = data.get(t, 0) + 1 UnboundLocalError: local variable 't' referenced before assignment after: ..... invalid line '13:39:42' invalid line '13:39:42' invalid line '13:39:42' invalid line '13:39:42' invalid line '13:39:42' None