Compare commits

..

2 Commits

Author SHA1 Message Date
github-actions[bot] f93816977f Update schema with new tags: owner, owner_category_0, owner_category_1, category 2026-02-19 04:20:28 +00:00
github-actions[bot] a37bd43c09 Add community submission from @ggman12 (closes #29) 2026-02-19 04:20:26 +00:00
3 changed files with 31881 additions and 20 deletions
File diff suppressed because it is too large Load Diff
@@ -55,6 +55,9 @@
"$ref": "#/$defs/tagValue"
},
"properties": {
"category": {
"type": "string"
},
"citation_0": {
"type": "string"
},
@@ -79,6 +82,15 @@
"operator_icao": {
"type": "string"
},
"owner": {
"type": "string"
},
"owner_category_0": {
"type": "string"
},
"owner_category_1": {
"type": "string"
},
"serial_number": {
"type": "string"
},
+5 -20
View File
@@ -260,6 +260,7 @@ def extract_split_archive(file_paths: list, extract_dir: str) -> bool:
stdin=cat_proc.stdout,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
check=True
)
cat_proc.stdout.close()
cat_stderr = cat_proc.stderr.read().decode() if cat_proc.stderr else ""
@@ -268,24 +269,6 @@ def extract_split_archive(file_paths: list, extract_dir: str) -> bool:
if cat_stderr:
print(f"cat stderr: {cat_stderr}")
tar_stderr = result.stderr.decode() if result.stderr else ""
if result.returncode != 0:
# GNU tar exits non-zero for format issues that BSD tar silently
# tolerates (e.g. trailing junk after the last valid entry).
# Check whether files were actually extracted before giving up.
extracted_items = os.listdir(extract_dir)
if extracted_items:
print(f"[WARN] tar exited {result.returncode} but extracted "
f"{len(extracted_items)} items — treating as success")
if tar_stderr:
print(f"tar stderr: {tar_stderr}")
else:
print(f"Failed to extract split archive (tar exit {result.returncode})")
if tar_stderr:
print(f"tar stderr: {tar_stderr}")
shutil.rmtree(extract_dir, ignore_errors=True)
return False
print(f"Successfully extracted archive to {extract_dir}")
# Delete tar files immediately after extraction
@@ -302,9 +285,11 @@ def extract_split_archive(file_paths: list, extract_dir: str) -> bool:
print(f"Disk space after tar deletion: {free_gb:.1f}GB free")
return True
except Exception as e:
except subprocess.CalledProcessError as e:
stderr_output = e.stderr.decode() if e.stderr else ""
print(f"Failed to extract split archive: {e}")
shutil.rmtree(extract_dir, ignore_errors=True)
if stderr_output:
print(f"tar stderr: {stderr_output}")
return False