Skip to content

Commit

Permalink
app: lower the suffixes
Browse files Browse the repository at this point in the history
Lower the suffixes to also match
the filenames with uppercase suffixes
  • Loading branch information
zrgt authored and s-heppner committed Sep 4, 2024
1 parent 73569bf commit f8c81ba
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions server/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
continue
print(f"Loading {file}")

if file.suffix == ".json":
if file.suffix.lower() == ".json":
with open(file) as f:
adapter.json.read_aas_json_file_into(object_store, f)
elif file.suffix == ".xml":
elif file.suffix.lower() == ".xml":
with open(file) as f:
adapter.xml.read_aas_xml_file_into(object_store, file)
elif file.suffix == ".aasx":
elif file.suffix.lower() == ".aasx":
with aasx.AASXReader(file) as reader:
reader.read_into(object_store=object_store, file_store=file_store)

Expand All @@ -44,3 +44,6 @@
else:
print(f"STORAGE_TYPE must be either LOCAL_FILE or LOCAL_FILE_READ_ONLY! Current value: {storage_type}",
file=sys.stderr)

# Lower the suffix
# Lower the suffixes to also match the filenames with uppercase suffixes

0 comments on commit f8c81ba

Please sign in to comment.