diff options
author | Till Maas <opensource@till.name> | 2010-03-06 17:09:01 +0100 |
---|---|---|
committer | Till Maas <opensource@till.name> | 2010-03-06 17:09:01 +0100 |
commit | 00fc20aa958fbb43ffaf9c62ca60e1857cd04193 (patch) | |
tree | d247bb6864b6ae8e68a362751d64590fa1bc7f8e /fedora-easy-karma.py | |
parent | 444f68ea6c02864fa539255b6d17b190c4810626 (diff) | |
download | fedora-easy-karma-00fc20aa958fbb43ffaf9c62ca60e1857cd04193.tar.gz fedora-easy-karma-00fc20aa958fbb43ffaf9c62ca60e1857cd04193.tar.xz fedora-easy-karma-00fc20aa958fbb43ffaf9c62ca60e1857cd04193.zip |
introduce --no-skip-empty-comment
Diffstat (limited to 'fedora-easy-karma.py')
-rwxr-xr-x | fedora-easy-karma.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fedora-easy-karma.py b/fedora-easy-karma.py index 1d7af48..1e5c271 100755 --- a/fedora-easy-karma.py +++ b/fedora-easy-karma.py @@ -60,6 +60,7 @@ class FedoraEasyKarma(object): usage = self.wrap_paragraphs_prefix(usage, first_prefix="", width=80, extra_newline=False) parser = OptionParser(usage=usage) + parser.add_option("", "--no-skip-empty-comment", dest="skip_empty_comment", help="Do not skip update if comment is empty", action="store_false", default=True) parser.add_option("", "--bodhi-cached", dest="bodhi_cached", help="Use cached bodhi query", action="store_true", default=False) parser.add_option("", "--bodhi-cachedir", dest="bodhi_cachedir", help="Directory to store bodhi cache, default: %default", default="~/.fedora-easy-karma") parser.add_option("", "--bodhi-update-cache", dest="bodhi_update_cache", help="Update bodhi query cache", action="store_true", default=False) @@ -173,7 +174,7 @@ class FedoraEasyKarma(object): karma = self.raw_input("Comment? -1/0/1 ->karma, other -> skip> ", default=self.options.default_karma, add_to_history=False) if karma in ["-1", "0", "1"]: comment = self.raw_input("Comment> ", default=self.options.default_comment) - if comment: + if comment or not self.options.skip_empty_comment: result = self.send_comment(bc, update, comment, karma) if not result[0]: self.warning("Comment not submitted: %s" % result[1]) |