Exa-Networks/exaproxy — pull request #28 by ema (2014-08-20 14:14:40+00:00)
Title: Don't crash if getStats returns None

Hi!

This patch fixes the following error:

Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/opt/exaproxy/lib/exaproxy/util/debug.py", line 71, in
execfile(sys.argv[0])
File "/opt/exaproxy/lib/exaproxy/application.py", line 317, in
main()
File "/opt/exaproxy/lib/exaproxy/application.py", line 280, in main
Supervisor(configuration).run()
File "/opt/exaproxy/lib/exaproxy/supervisor.py", line 300, in run
self.monitor.second()
File "/opt/exaproxy/lib/exaproxy/monitor.py", line 146, in second
self.seconds.append(self.statistics())
File "/opt/exaproxy/lib/exaproxy/monitor.py", line 122, in statistics
[redirector_stats] = redirector.getStats()
TypeError: 'NoneType' object is not iterable