summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJamie Nguyen <j@jamielinux.com>2014-04-29 21:57:18 +0100
committerTill Maas <opensource@till.name>2014-08-31 17:05:33 +0200
commitde60d2533848200ff23eab913779d3ed18a37abb (patch)
tree87fcb009c55a46b4fe8c7eb44c6c19de8e0591ad
parent9afd5ac7761490ee5eff006db1fa783426682482 (diff)
downloadfedora-easy-karma-de60d2533848200ff23eab913779d3ed18a37abb.tar.gz
fedora-easy-karma-de60d2533848200ff23eab913779d3ed18a37abb.tar.xz
fedora-easy-karma-de60d2533848200ff23eab913779d3ed18a37abb.zip
Add --ignore-own option
This allows the user to ignore updates that have been submitted by themselves. This assumes that the user is running fedora-easy-karma with the --fas-username option.
-rwxr-xr-xfedora-easy-karma.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/fedora-easy-karma.py b/fedora-easy-karma.py
index 1fc7b1e..22a5903 100755
--- a/fedora-easy-karma.py
+++ b/fedora-easy-karma.py
@@ -245,6 +245,7 @@ class FedoraEasyKarma(object):
parser.add_option("", "--default-comment", dest="default_comment", help="Default comment to use, default: %default", default="", metavar="COMMENT")
parser.add_option("", "--default-karma", dest="default_karma", help="Default karma to use, default: %default", default="", metavar="KARMA")
parser.add_option("", "--fas-username", dest="fas_username", help="FAS username", default=None)
+ parser.add_option("", "--ignore-own", dest="ignore_own", help="Ignore updates submitted by the current FAS username", action="store_true", default=False)
parser.add_option("", "--include-commented", dest="include_commented", help="Also ask for more comments on updates that already got a comment from you, this is enabled if patterns are provided", action="store_true", default=False)
parser.add_option("", "--include-ignored", dest="include_ignored", help="Also ask for comments on updates that have been ignored previously.", action="store_true", default=False)
parser.add_option("", "--installed-max-days", dest="installed_max_days", help="Only check packages installed within the last XX days, default: %default", metavar="DAYS", default=28, type="int")
@@ -424,6 +425,10 @@ class FedoraEasyKarma(object):
ignored_updates.append(update.title)
continue
+ # Do not query for updates submitted by the current FAS username.
+ if self.options.ignore_own and update["submitter"] == self.options.fas_username:
+ continue
+
if update not in processed_updates and build in installed_testing_builds:
processed_updates.append(update)