Skip to content

Commit

Permalink
[Codemod][python/main_function] antlir
Browse files Browse the repository at this point in the history
Reviewed By: zsol

Differential Revision: D51190702

fbshipit-source-id: f385e85d36e83cd5fe87d40ee06b5f6403db85b4
  • Loading branch information
generatedunixname89002005287564 authored and facebook-github-bot committed Nov 10, 2023
1 parent 2e93d12 commit 077d68f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ oncall("antlir_oss")
python_binary(
name = "targets-from-upstream",
srcs = ["targets_from_upstream.py"],
main_module = "antlir.antlir2.package_managers.dnf.snapshot.targets_from_upstream.targets_from_upstream",
main_function = "antlir.antlir2.package_managers.dnf.snapshot.targets_from_upstream.targets_from_upstream.invoke_main",
deps = [
third_party.library(
"requests",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,12 @@ def main(args) -> None:
f.write("\n")


if __name__ == "__main__":
def invoke_main() -> None:
parser = argparse.ArgumentParser()
parser.add_argument("--dst", type=Path)
parser.add_argument("baseurls", nargs="+", type=urlparse)
main(parser.parse_args())


if __name__ == "__main__":
invoke_main() # pragma: no cover

0 comments on commit 077d68f

Please sign in to comment.