Make r2c export helper exit cleanly after streaming
Browse files
scripts/export_r2c_layout.py
CHANGED
|
@@ -5,6 +5,7 @@ from __future__ import annotations
|
|
| 5 |
|
| 6 |
import argparse
|
| 7 |
import json
|
|
|
|
| 8 |
import shutil
|
| 9 |
from itertools import islice
|
| 10 |
from pathlib import Path
|
|
@@ -98,7 +99,8 @@ def main() -> None:
|
|
| 98 |
json.dump(metadata, f, separators=(",", ":"))
|
| 99 |
seen.add(metadata_fn)
|
| 100 |
|
| 101 |
-
print(f"Wrote r2c-compatible VCR layout to {args.output_dir}")
|
|
|
|
| 102 |
|
| 103 |
|
| 104 |
if __name__ == "__main__":
|
|
|
|
| 5 |
|
| 6 |
import argparse
|
| 7 |
import json
|
| 8 |
+
import os
|
| 9 |
import shutil
|
| 10 |
from itertools import islice
|
| 11 |
from pathlib import Path
|
|
|
|
| 99 |
json.dump(metadata, f, separators=(",", ":"))
|
| 100 |
seen.add(metadata_fn)
|
| 101 |
|
| 102 |
+
print(f"Wrote r2c-compatible VCR layout to {args.output_dir}", flush=True)
|
| 103 |
+
os._exit(0)
|
| 104 |
|
| 105 |
|
| 106 |
if __name__ == "__main__":
|