From de60d2533848200ff23eab913779d3ed18a37abb Mon Sep 17 00:00:00 2001 From: Jamie Nguyen Date: Aug 31 2014 15:05:33 +0000 Subject: 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. --- 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)