comparison sat_frontends/jp/cmd_blog.py @ 2945:6c264c224614

jp (blog/edit): fixed --last-item after recent change in defaut value of --item
author Goffi <goffi@goffi.org>
date Sun, 05 May 2019 18:50:38 +0200
parents efb915a20d5d
children eafea3bcf111
comparison
equal deleted inserted replaced
2944:efb915a20d5d 2945:6c264c224614
557 def getTmpSuff(self): 557 def getTmpSuff(self):
558 # we get current syntax to determine file extension 558 # we get current syntax to determine file extension
559 return SYNTAX_EXT.get(self.current_syntax, SYNTAX_EXT[""]) 559 return SYNTAX_EXT.get(self.current_syntax, SYNTAX_EXT[""])
560 560
561 def getItemData(self, service, node, item): 561 def getItemData(self, service, node, item):
562 items = [item] if item is not None else [] 562 items = [item] if item else []
563 mb_data = self.host.bridge.mbGet(service, node, 1, items, {}, self.profile)[0][0] 563 mb_data = self.host.bridge.mbGet(service, node, 1, items, {}, self.profile)[0][0]
564 mb_data = data_format.deserialise(mb_data) 564 mb_data = data_format.deserialise(mb_data)
565 try: 565 try:
566 content = mb_data["content_xhtml"] 566 content = mb_data["content_xhtml"]
567 except KeyError: 567 except KeyError: