Changeset - 8c878eb4e214
[Not reviewed]
default
0 2 0
Drew Perttula - 14 years ago 2011-06-16 07:11:58
drewp@bigasterisk.com
fix networking
Ignore-this: 11d53f969e27bc8164e67fd0b12ba42
2 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
light9/networking.py
Show inline comments
 
@@ -7,13 +7,13 @@ class ServiceAddress(object):
 
    def __init__(self, service):
 
        self.service = service
 

	
 
    def _url(self):
 
        graph = getGraph()
 
        net = graph.value(showUri(), L9['networking'])
 
        return graph.value(net, self.service)
 
        return str(graph.value(net, self.service))
 

	
 
    @property
 
    def port(self):
 
        _, netloc, _, _, _, _ = urlparse(self._url())
 
        host, port = splitport(netloc)
 
        return int(port)
 
@@ -26,12 +26,12 @@ class ServiceAddress(object):
 

	
 
    @property
 
    def url(self):
 
        return self._url()
 

	
 
    def path(self, more):
 
        return self.url + more
 
        return self.url + str(more)
 

	
 
dmxServer = ServiceAddress(L9['dmxServer'])
 
musicPlayer = ServiceAddress(L9['musicPlayer'])
 
keyboardComposer = ServiceAddress(L9['keyboardComposer'])
 

	
light9/showconfig.py
Show inline comments
 
@@ -12,13 +12,13 @@ def getGraph():
 

	
 
    # file patch.n3 mtime is not currently being checked
 
    
 
    now = time.time()
 
    diskMtime = path.getmtime(configPath)
 
    if diskMtime <= _config[1]:
 
        log.info("reuse graph")
 
        log.info("config.n3 hasn't changed")
 
        graph = _config[0]
 
        # i'm scared of some program modifying the graph, and then i
 
        # return that from a new getGraph call. Maybe I should be
 
        # copying it right here, or doing something clever with
 
        # contexts
 
        assert len(graph) == _config[2]
0 comments (0 inline, 0 general)