From d5a7fdb46791e349e95efed8b6a1e3276fe045d5 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Mon, 21 Jun 2021 22:20:39 -0700 Subject: [PATCH] Migrate scripts to operatornotify.main_decorator. --- fdroidapk.py | 6 ++---- rarpar.py | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/fdroidapk.py b/fdroidapk.py index 78dc80a..a08295a 100644 --- a/fdroidapk.py +++ b/fdroidapk.py @@ -116,10 +116,9 @@ def fpk_argparse(args): return return_status +@operatornotify.main_decorator(subject='fdroidapk.py') @vlogging.main_decorator def main(argv): - (notify_context, argv) = operatornotify.main_log_context(argv, subject='fdroidapk warnings') - parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('packages', nargs='+') @@ -127,8 +126,7 @@ def main(argv): parser.add_argument('--destination', default='.') parser.set_defaults(func=fpk_argparse) - with notify_context: - return betterhelp.single_main(argv, parser, __doc__) + return betterhelp.single_main(argv, parser, __doc__) if __name__ == '__main__': raise SystemExit(main(sys.argv[1:])) diff --git a/rarpar.py b/rarpar.py index 176fa0a..cf854bb 100644 --- a/rarpar.py +++ b/rarpar.py @@ -527,10 +527,9 @@ def rarpar_argparse(args): return status +@operatornotify.main_decorator(subject='rarpar.py') @vlogging.main_decorator def main(argv): - (notify_context, argv) = operatornotify.main_log_context(argv, subject='rarpar warnings') - parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('path') @@ -550,8 +549,7 @@ def main(argv): parser.add_argument('--dry', action='store_true') parser.set_defaults(func=rarpar_argparse) - with notify_context: - return betterhelp.single_main(argv, parser, DOCSTRING) + return betterhelp.single_main(argv, parser, DOCSTRING) if __name__ == '__main__': raise SystemExit(main(sys.argv[1:]))