Migrate scripts to main_level_by_argv.

This commit is contained in:
voussoir 2021-05-16 21:07:43 -07:00
parent 7bc152f05a
commit 87e733c4a2
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB
12 changed files with 12 additions and 12 deletions

View file

@ -47,7 +47,7 @@ def adbinstall_argparse(args):
os.system(command) os.system(command)
def main(argv): def main(argv):
argv = vlogging.set_level_by_argv(log, argv) argv = vlogging.main_level_by_argv(argv)
parser = argparse.ArgumentParser(description=__doc__) parser = argparse.ArgumentParser(description=__doc__)

View file

@ -61,7 +61,7 @@ def bitwise_or_argparse(args):
pipeable.stdout(output.absolute_path) pipeable.stdout(output.absolute_path)
def main(argv): def main(argv):
argv = vlogging.set_level_by_argv(log, argv) argv = vlogging.main_level_by_argv(argv)
parser = argparse.ArgumentParser(description=__doc__) parser = argparse.ArgumentParser(description=__doc__)

View file

@ -117,7 +117,7 @@ def fpk_argparse(args):
return return_status return return_status
def main(argv): def main(argv):
argv = vlogging.set_level_by_argv(log, argv) argv = vlogging.main_level_by_argv(argv)
(notify_context, argv) = operatornotify.main_log_context(argv, subject='fdroidapk warnings') (notify_context, argv) = operatornotify.main_log_context(argv, subject='fdroidapk warnings')
parser = argparse.ArgumentParser(description=__doc__) parser = argparse.ArgumentParser(description=__doc__)

View file

@ -132,7 +132,7 @@ def ffstreams_argparse(args):
) )
def main(argv): def main(argv):
argv = vlogging.set_level_by_argv(log, argv) argv = vlogging.main_level_by_argv(argv)
parser = argparse.ArgumentParser(description=__doc__) parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('input_filename', nargs='+') parser.add_argument('input_filename', nargs='+')

View file

@ -59,7 +59,7 @@ def hash_hardlink_argparse(args):
os.link(leader.absolute_path, follower.absolute_path) os.link(leader.absolute_path, follower.absolute_path)
def main(argv): def main(argv):
argv = vlogging.set_level_by_argv(log, argv) argv = vlogging.main_level_by_argv(argv)
parser = argparse.ArgumentParser(description=__doc__) parser = argparse.ArgumentParser(description=__doc__)

View file

@ -30,7 +30,7 @@ def heresmyclipboard_argparse(args):
site.run(host='0.0.0.0', port=args.port) site.run(host='0.0.0.0', port=args.port)
def main(argv): def main(argv):
argv = vlogging.set_level_by_argv(log, argv) argv = vlogging.main_level_by_argv(argv)
parser = argparse.ArgumentParser(description=__doc__) parser = argparse.ArgumentParser(description=__doc__)

View file

@ -528,7 +528,7 @@ def rarpar_argparse(args):
return status return status
def main(argv): def main(argv):
argv = vlogging.set_level_by_argv(log, argv) argv = vlogging.main_level_by_argv(argv)
(notify_context, argv) = operatornotify.main_log_context(argv, subject='rarpar warnings') (notify_context, argv) = operatornotify.main_log_context(argv, subject='rarpar warnings')
parser = argparse.ArgumentParser(description=__doc__) parser = argparse.ArgumentParser(description=__doc__)

View file

@ -57,7 +57,7 @@ def reserve_disk_space_argparse(args):
return 1 return 1
def main(argv): def main(argv):
argv = vlogging.set_level_by_argv(log, argv) argv = vlogging.main_level_by_argv(argv)
parser = argparse.ArgumentParser(description=__doc__) parser = argparse.ArgumentParser(description=__doc__)

View file

@ -56,7 +56,7 @@ def sole_lift_argparse(args):
queue.append(directory.parent) queue.append(directory.parent)
def main(argv): def main(argv):
argv = vlogging.set_level_by_argv(log, argv) argv = vlogging.main_level_by_argv(argv)
parser = argparse.ArgumentParser(description=__doc__) parser = argparse.ArgumentParser(description=__doc__)

View file

@ -13,7 +13,7 @@ def printstderr_argparse(args):
pipeable.stderr(line) pipeable.stderr(line)
def main(argv): def main(argv):
argv = vlogging.set_level_by_argv(log, argv) argv = vlogging.main_level_by_argv(argv)
parser = argparse.ArgumentParser(description=__doc__) parser = argparse.ArgumentParser(description=__doc__)

View file

@ -13,7 +13,7 @@ def printstdout_argparse(args):
pipeable.stdout(line) pipeable.stdout(line)
def main(argv): def main(argv):
argv = vlogging.set_level_by_argv(log, argv) argv = vlogging.main_level_by_argv(argv)
parser = argparse.ArgumentParser(description=__doc__) parser = argparse.ArgumentParser(description=__doc__)

View file

@ -44,7 +44,7 @@ def stitch_argparse(args):
final_image.save(args.output) final_image.save(args.output)
def main(argv): def main(argv):
argv = vlogging.set_level_by_argv(log, argv) argv = vlogging.main_level_by_argv(argv)
parser = argparse.ArgumentParser(description=__doc__) parser = argparse.ArgumentParser(description=__doc__)