From 107c5850403d88393a819538426fe9594f5746ec Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Fri, 20 May 2022 00:31:00 -0700 Subject: [PATCH] __main__ thing --- nix_pin_deps.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/nix_pin_deps.py b/nix_pin_deps.py index 30aef6d..6f12df8 100644 --- a/nix_pin_deps.py +++ b/nix_pin_deps.py @@ -96,6 +96,11 @@ def pinBuiltThings(thing: str, pinBuiltThings(dep, done, deps) -dep_graph = getDeps(sys.argv[1]) -for root in dep_graph.roots: - pinBuiltThings(root, set(), dep_graph.deps) +def main() -> None: + dep_graph = getDeps(sys.argv[1]) + for root in dep_graph.roots: + pinBuiltThings(root, set(), dep_graph.deps) + + +if __name__ == '__main__': + main() -- 2.44.1