MCPcopy Create free account
hub / github.com/AMReX-Astro/Castro / doit

Function doit

Util/scripts/check_network.py:7–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5
6
7def doit():
8
9 parser = argparse.ArgumentParser()
10 parser.add_argument("network", type=str, nargs=1)
11 parser.add_argument("auto_source_dir", type=str, nargs=1)
12
13 args = parser.parse_args()
14
15 net = args.network[0]
16 auto_dir = args.auto_source_dir[0]
17
18 try:
19 with open(f"{auto_dir}/NETWORK_USED") as f:
20 stored_net = f.readlines()[0].strip()
21 if stored_net != net:
22 sys.exit("network inconsistent. do 'make clean' and retry")
23
24 except OSError:
25 pass
26
27
28if __name__ == "__main__":

Callers 1

check_network.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected