changeset 3241:46f0b388eeea

jp (blog/edit): --no-publish is a boolean option
author Goffi <goffi@goffi.org>
date Tue, 31 Mar 2020 08:45:49 +0200
parents d85b68e44297
children 6d0137022df2
files sat_frontends/jp/cmd_blog.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sat_frontends/jp/cmd_blog.py	Mon Mar 30 19:59:17 2020 +0200
+++ b/sat_frontends/jp/cmd_blog.py	Tue Mar 31 08:45:49 2020 +0200
@@ -468,6 +468,7 @@
         )
         self.parser.add_argument(
             "--no-publish",
+            action="store_true",
             help=_('add "publish: False" to metadata'),
         )
 
@@ -510,7 +511,7 @@
         # and override metadata with command-line arguments
         self.setMbDataFromArgs(mb_data)
 
-        if self.args.no_publish is not None:
+        if self.args.no_publish:
             mb_data["publish"] = False
 
         # then we create the file and write metadata there, as JSON dict