Mercurial > libervia-backend
comparison sat/core/sat_main.py @ 2914:25f14fbd364e
core: added getNamespace method to retrieve a namespace from short name.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 14 Apr 2019 08:21:51 +0200 |
parents | 82b781c46841 |
children | 06f30ad8e110 |
comparison
equal
deleted
inserted
replaced
2913:672e6be3290f | 2914:25f14fbd364e |
---|---|
611 self.ns_map[short_name] = namespace | 611 self.ns_map[short_name] = namespace |
612 | 612 |
613 def getNamespaces(self): | 613 def getNamespaces(self): |
614 return self.ns_map | 614 return self.ns_map |
615 | 615 |
616 def getNamespace(self, short_name): | |
617 try: | |
618 return self.ns_map[short_name] | |
619 except KeyError: | |
620 raise exceptions.NotFound(u"namespace {short_name} is not registered" | |
621 .format(short_name=short_name)) | |
622 | |
616 def getSessionInfos(self, profile_key): | 623 def getSessionInfos(self, profile_key): |
617 """compile interesting data on current profile session""" | 624 """compile interesting data on current profile session""" |
618 client = self.getClient(profile_key) | 625 client = self.getClient(profile_key) |
619 data = { | 626 data = { |
620 "jid": client.jid.full(), | 627 "jid": client.jid.full(), |