tools/mpp: move main code into main function

Move all the global code into a `main` function and call that. This
fixes a lot of pylint warnings where variable names were re-used
from the main, and thus global, context.
This commit is contained in:
Christian Kellner 2021-06-30 17:06:53 +00:00 committed by Tom Gundersen
parent 802f401069
commit 1202085883

View file

@ -511,7 +511,7 @@ class ManifestFileV2(ManifestFile):
self._process_depsolve(solver, stage)
if __name__ == "__main__":
def main():
parser = argparse.ArgumentParser(description="Manifest pre processor")
parser.add_argument(
"--dnf-cache",
@ -557,3 +557,7 @@ if __name__ == "__main__":
with sys.stdout if args.dst == "-" else open(args.dst, "w") as f:
m.write(f, args.sort_keys)
if __name__ == "__main__":
main()