changeset 835:9c8583cd14ea

better error when network config is missing Ignore-this: 978b097cca2d8503fd065f89cf9877f6
author Drew Perttula <drewp@bigasterisk.com>
date Tue, 04 Jun 2013 23:52:27 +0000
parents ae359590eb8a
children dc35587fbbb6
files light9/networking.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/light9/networking.py	Tue Jun 04 23:52:13 2013 +0000
+++ b/light9/networking.py	Tue Jun 04 23:52:27 2013 +0000
@@ -10,7 +10,10 @@
     def _url(self):
         graph = getGraph()
         net = graph.value(showUri(), L9['networking'])
-        return str(graph.value(net, self.service))
+        ret = graph.value(net, self.service)
+        if ret is None:
+            raise ValueError("no url for %s %s" % (showUri(), L9['networking']))
+        return str(ret)
 
     @property
     def port(self):