qtile/qtile — pull request #546 by fscherf (2014-11-20 19:38:35+00:00)
Title: widget: graph: NetGraph: fix unhandled exception

If Qtile trys to come up without default route, this TraceBack appears:

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/qtile-0.8.0-py2.7.egg/libqtile/confreader.py", line 54, in __init__
config = __import__(os.path.basename(fname)[:-3])
File "/home/fsc/.config/qtile/config.py", line 139, in
widget.NetGraph(**widget_graph_defaults),
File "/usr/local/lib/python2.7/dist-packages/qtile-0.8.0-py2.7.egg/libqtile/widget/graph.py", line 285, in __init__
self.interface = self.get_main_iface()
File "/usr/local/lib/python2.7/dist-packages/qtile-0.8.0-py2.7.egg/libqtile/widget/graph.py", line 321, in get_main_iface
routes[0]
IndexError: list index out of range

Signed-off-by: Florian Scherf