diff --git a/frontends/src/jp/cmd_blog.py b/frontends/src/jp/cmd_blog.py index 3f0968b3..57b97bf3 100644 --- a/frontends/src/jp/cmd_blog.py +++ b/frontends/src/jp/cmd_blog.py @@ -150,6 +150,12 @@ class Edit(base.CommandBase): file_path=tmp_file_path, meta_path=meta_file_path), error=True) self.host.quit(1) + if not C.bool(mb_data.get('publish', "true")): + self.disp(u'Publication blocked by "publish" key in metadata, cancelling edition.\n\n' + + "temporary file path:\t{file_path}\nmetadata file path:\t{meta_path}".format( + file_path=tmp_file_path, meta_path=meta_file_path), error=True) + self.host.quit(0) + if len(content) == 0: self.disp(u"Content is empty, cancelling the blog edition")