Mercurial > libervia-backend
diff frontends/src/jp/cmd_blog.py @ 1864:96ba685162f6
jp: all commands now use the new start method and set need_loop in __init__ when needed
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 29 Feb 2016 16:52:51 +0100 |
parents | 9eabf7fadfdd |
children | 397ef87958b9 |
line wrap: on
line diff
--- a/frontends/src/jp/cmd_blog.py Mon Feb 29 16:52:51 2016 +0100 +++ b/frontends/src/jp/cmd_blog.py Mon Feb 29 16:52:51 2016 +0100 @@ -30,6 +30,7 @@ class Import(base.CommandAnswering): def __init__(self, host): super(Import, self).__init__(host, 'import', use_progress=True, help=_(u'import an external blog')) + self.need_loop=True def add_parser_options(self): self.parser.add_argument("importer", type=base.unicode_decoder, nargs='?', help=_(u"importer name, nothing to display importers list")) @@ -67,11 +68,7 @@ self.disp(_("Error while trying to upload a blog: {reason}").format(reason=failure), error=True) self.host.quit(1) - def connected(self): - """Send files to jabber contact""" - self.need_loop=True - super(Import, self).connected() - + def start(self): if self.args.location is None: for name in ('option', 'service', 'no_images_upload'): if getattr(self.args, name): @@ -108,7 +105,7 @@ class Blog(base.CommandBase): - subcommands = (Import,) + subcommands = (Edit, Import) def __init__(self, host): super(Blog, self).__init__(host, 'blog', use_profile=False, help=_('blog/microblog management'))