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:
parent
802f401069
commit
1202085883
1 changed files with 5 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue