summaryrefslogtreecommitdiffstats
path: root/bin/review-update-needed
diff options
context:
space:
mode:
authorAntoine Beaupré <anarcat@debian.org>2018-11-09 13:13:38 -0500
committerAntoine Beaupré <anarcat@debian.org>2018-11-09 13:13:38 -0500
commita9f0666d09eb7a7a599a68e5f877324cfc2a1863 (patch)
treebfb18404c92b0d91e41ed28900962441c4433faf /bin/review-update-needed
parentae15f04c1957491ab91dd4ba42e0320d7e29fdeb (diff)
add --quiet argument to allow running as a cronjob
Diffstat (limited to 'bin/review-update-needed')
-rwxr-xr-xbin/review-update-needed16
1 files changed, 10 insertions, 6 deletions
diff --git a/bin/review-update-needed b/bin/review-update-needed
index b50bd513cb..0a20ba2fb5 100755
--- a/bin/review-update-needed
+++ b/bin/review-update-needed
@@ -25,12 +25,16 @@ parser.add_argument('--lts', action='store_true',
help='Review dla-needed.txt instead of dsa-needed.txt')
parser.add_argument('-v', '--verbose', action='store_true',
help='Show more information, e.g. notes, commit author and per user stats')
+parser.add_argument('--quiet', action='store_true',
+ help='Do not output anything but errors')
parser.add_argument('--sort-by', default='last-update',
choices=('last-update', 'claimed-date'),
help='Sort by last-update (default) or by claimed-date')
parser.add_argument('--skip-unclaimed', action='store_true',
help='Skip unclaimed packages in the review')
args = parser.parse_args()
+if args.verbose and args.quiet:
+ args.error("--verbose and --quiet contradiction")
if args.lts:
dsa_dla_needed = 'data/dla-needed.txt'
@@ -100,16 +104,16 @@ all_entries.sort(key=lambda x: x[args.sort_by])
for entry in all_entries:
if args.skip_unclaimed and not entry['claimed-by']:
continue
- print("Package: {}".format(entry['pkg']))
+ args.quiet or print("Package: {}".format(entry['pkg']))
if entry['claimed-by']:
- print("Claimed-By: {}".format(entry['claimed-by']))
- print("Claimed-Date: {}".format(format_date(entry['claimed-date'])))
+ args.quiet or print("Claimed-By: {}".format(entry['claimed-by']))
+ args.quiet or print("Claimed-Date: {}".format(format_date(entry['claimed-date'])))
else:
- print("Unclaimed-Since: {}".format(format_date(entry['claimed-date'])))
+ args.quiet or print("Unclaimed-Since: {}".format(format_date(entry['claimed-date'])))
if entry['last-update'] > entry['claimed-date']:
- print("Last-Update: {}".format(format_date(entry['last-update'])))
+ args.quiet or print("Last-Update: {}".format(format_date(entry['last-update'])))
if not args.verbose:
- print("")
+ args.quiet or print("")
continue
print("Last-Update-Author: {}".format(entry['last-update-author']))
print("Last-Update-Summary: {}".format(entry['last-update-summary']))

© 2014-2024 Faster IT GmbH | imprint | privacy policy