diff options
author | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-11-29 18:54:30 +0000 |
---|---|---|
committer | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-11-29 18:54:30 +0000 |
commit | a96188385f53b81c07f84ef1de85791a5184bf55 (patch) | |
tree | cff8430d201cdd588408b55dbfccc2fb5d0536a6 /src/core.py | |
parent | cbcec6a798557d4905554c446a5291ac2c1f46ec (diff) | |
download | poezio-a96188385f53b81c07f84ef1de85791a5184bf55.tar.gz poezio-a96188385f53b81c07f84ef1de85791a5184bf55.tar.bz2 poezio-a96188385f53b81c07f84ef1de85791a5184bf55.tar.xz poezio-a96188385f53b81c07f84ef1de85791a5184bf55.zip |
can now complete with NOTHING in the node
Diffstat (limited to 'src/core.py')
-rw-r--r-- | src/core.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core.py b/src/core.py index f7ad4386..8a5b4753 100644 --- a/src/core.py +++ b/src/core.py @@ -930,13 +930,18 @@ class Core(object): if jid.resource or jid.full.endswith('/'): # we are writing the resource: complete the node if not the_input.last_completion: - items = self.xmpp.plugin['xep_0030'].getItems(jid.server)['disco_items'].getItems() + response = self.xmpp.plugin['xep_0030'].getItems(jid.server) + log.debug('HEY: %s\n' % response) + if response: + items = response['disco_items'].getItems() + else: + return True items = ['%s/%s' % (tup[0], jid.resource) for tup in items] for i in range(len(jid.server) + 2 + len(jid.resource)): - log.debug('allo') the_input.key_backspace() else: items = [] + log.debug('%s\n' % items) the_input.auto_completion(items, '') else: # we are writing the server: complete the server |