comparison frontends/src/jp/cmd_event.py @ 2284:4fd010f29f99

jp (blog, event): added checkURI to some command to be able to enter a xmpp: uri as argument
author Goffi <goffi@goffi.org>
date Thu, 29 Jun 2017 20:36:35 +0200
parents 5b04fc0c663d
children f4d8d83a50e2
comparison
equal deleted inserted replaced
2283:5b04fc0c663d 2284:4fd010f29f99
19 19
20 20
21 import base 21 import base
22 from sat.core.i18n import _ 22 from sat.core.i18n import _
23 from sat_frontends.jp.constants import Const as C 23 from sat_frontends.jp.constants import Const as C
24 from sat_frontends.jp import common
24 from functools import partial 25 from functools import partial
25 from dateutil import parser as du_parser 26 from dateutil import parser as du_parser
26 import calendar 27 import calendar
27 import time 28 import time
28 29
51 event_data['date'] = event_date 52 event_data['date'] = event_date
52 self.output(event_data) 53 self.output(event_data)
53 self.host.quit() 54 self.host.quit()
54 55
55 def start(self): 56 def start(self):
57 common.checkURI(self.args)
56 self.host.bridge.eventGet( 58 self.host.bridge.eventGet(
57 self.args.service, 59 self.args.service,
58 self.args.node, 60 self.args.node,
59 self.args.item, 61 self.args.item,
60 self.profile, 62 self.profile,
124 super(Modify, self).__init__(host, 'modify', use_pubsub_node_req=True, help=_('modify an existing event')) 126 super(Modify, self).__init__(host, 'modify', use_pubsub_node_req=True, help=_('modify an existing event'))
125 EventBase.__init__(self) 127 EventBase.__init__(self)
126 self.need_loop=True 128 self.need_loop=True
127 129
128 def start(self): 130 def start(self):
131 common.checkURI(self.args)
129 fields = self.parseFields() 132 fields = self.parseFields()
130 date = 0 if not self.args.date else self.parseDate() 133 date = 0 if not self.args.date else self.parseDate()
131 self.host.bridge.eventModify( 134 self.host.bridge.eventModify(
132 self.args.service, 135 self.args.service,
133 self.args.node, 136 self.args.node,