Mercurial > libervia-backend
changeset 46:18f6c9e60507
jid parsing fix: node is now empty for transports
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 06 Jan 2010 23:43:54 +1100 |
parents | 118a4737b405 |
children | 9aa2d9dd4045 |
files | tools/jid.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/jid.py Wed Jan 06 23:41:47 2010 +1100 +++ b/tools/jid.py Wed Jan 06 23:43:54 2010 +1100 @@ -33,14 +33,14 @@ """find node domaine and resource""" node_end=self.find('@') if node_end<0: - node_end=len(self) + node_end=0 domain_end=self.find('/') if domain_end<1: domain_end=len(self) self.node=self[:node_end] - self.domain=self[node_end+1:domain_end] + self.domain=self[(node_end+1) if node_end else 0:domain_end] self.resource=self[domain_end+1:] - if node_end==len(self): + if not node_end: self.short=self else: self.short=self.node+'@'+self.domain