# HG changeset patch # User Goffi # Date 1500015963 -7200 # Node ID ca14e1ced3b56c1ff5e304ab3f50d51780680490 # Parent a21b3b31086dc189f06736b3ec279119c5fc9c57 jp (common): fixed decode error when item is not specified diff -r a21b3b31086d -r ca14e1ced3b5 frontends/src/jp/common.py --- a/frontends/src/jp/common.py Fri Jul 14 08:34:10 2017 +0200 +++ b/frontends/src/jp/common.py Fri Jul 14 09:06:03 2017 +0200 @@ -425,7 +425,9 @@ 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: