runners/rhel82: extract code into main function

Move the code in `__main__` to a `main` function to not pollute the
global namespace.
This commit is contained in:
Christian Kellner 2021-06-08 08:54:46 +02:00
parent 7ad212dc89
commit 1fbe4bb31a

View file

@ -49,7 +49,7 @@ def python_alternatives():
pass
if __name__ == "__main__":
def main():
with osbuild.api.exception_handler():
ldconfig()
sysusers()
@ -59,3 +59,7 @@ if __name__ == "__main__":
r = subprocess.run(sys.argv[1:], check=False)
sys.exit(r.returncode)
if __name__ == "__main__":
main()