jp (common): fixed decode error when item is not specified
This commit is contained in:
parent
50ff24cc64
commit
b4312f210a
1 changed files with 3 additions and 1 deletions
|
|
@ -425,7 +425,9 @@ class BaseEdit(object):
|
|||
except KeyError:
|
||||
self.disp(u'No node found in xmpp: URI, can\'t retrieve item', error=True)
|
||||
self.host.quit(1)
|
||||
pubsub_item = pubsub_data.get('item',[None])[0].decode('utf-8')
|
||||
pubsub_item = pubsub_data.get('item',[None])[0]
|
||||
if pubsub_item is not None:
|
||||
pubsub_item = pubsub_item.decode('utf-8')
|
||||
if pubsub_item is None and self.args.last_item:
|
||||
command = 'last'
|
||||
elif pubsub_item is not None:
|
||||
|
|
|
|||
Loading…
Reference in a new issue