knopwob/gmailnotify — pull request #1 by lithid (2013-04-27 14:11:10+00:00)
Title: Fix NoneType Traceback when no -w option set.

Traceback (most recent call last):
File "./gmailnotify.py", line 241, in
main()
File "./gmailnotify.py", line 238, in main
run(config, boxes)
File "./gmailnotify.py", line 92, in run
f.close()
AttributeError: 'NoneType' object has no attribute 'close'

Check if f is None, don't try to close a file you never opened.