Mercurial > code > home > repos > rdfdb
changeset 37:9b4c551dddfb
fix registration bug (tried to send bytes to json encoder)
Ignore-this: 166816604c34341844b4b4bb0618ff71
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Sat, 25 May 2019 23:54:54 +0000 |
parents | fefdf52fc6bc |
children | b3ae192c05e4 |
files | rdfdb/service.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/rdfdb/service.py Sat May 25 06:39:30 2019 +0000 +++ b/rdfdb/service.py Sat May 25 23:54:54 2019 +0000 @@ -35,7 +35,7 @@ """ one of our syncedgraph clients """ - def __init__(self, updateUri: bytes, label): + def __init__(self, updateUri: bytes, label: str): self.label = label # todo: updateUri is used publicly to compare clients. Replace # it with Client.__eq__ so WsClient doesn't have to fake an @@ -268,9 +268,9 @@ self.clients.append(newClient) self.sendClientsToAllLivePages() - def sendClientsToAllLivePages(self): - sendToLiveClients({"clients":[ - dict(updateUri=c.updateUri, label=repr(c)) + def sendClientsToAllLivePages(self) -> None: + sendToLiveClients({"clients": [ + dict(updateUri=c.updateUri.decode('utf8'), label=repr(c)) for c in self.clients]}) class GraphResource(cyclone.web.RequestHandler):