Skip to content

Commit

Permalink
fix: Use correct paths on windows for local manifest file
Browse files Browse the repository at this point in the history
Signed-off-by: Caden Marofke <[email protected]>
  • Loading branch information
marofke committed Apr 15, 2024
1 parent a62e0ae commit babf31c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/deadline/job_attachments/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ def upload_assets(
manifest_name = f"{manifest_name_prefix}_input"

if manifest_write_dir:
local_manifest_file = os.path.join(
local_manifest_file = Path(
manifest_write_dir, "manifests", partial_manifest_prefix, manifest_name
)
logger.info(f"Creating local manifest file: {local_manifest_file}\n")
os.makedirs(os.path.dirname(local_manifest_file), exist_ok=True)
local_manifest_file.parent.mkdir(parents=True, exist_ok=True)
with open(local_manifest_file, "w") as file:
file.write(manifest.encode())

Expand Down
4 changes: 3 additions & 1 deletion test/unit/deadline_job_attachments/test_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ def test_asset_management(
output_dir1 = tmpdir.join("outputs")
output_dir2 = tmpdir.join("outputs").join("textures")

history_dir = tmpdir.join("history")
history_dir = tmpdir.join(
"veeeeeeeeeeeeerrrrrrrrrrrryyyyyyyyyy-looooooooooooooooonnnnnnng-paaaaaaaaaaaaaaaaaaaaaaaaaaaath"
)
expected_manifest_file = (
history_dir.join("manifests")
.join(farm_id)
Expand Down

0 comments on commit babf31c

Please sign in to comment.