Skip to content

Commit

Permalink
Merge pull request #2170 from kacf/error_checking
Browse files Browse the repository at this point in the history
build: Add additional error checking for missing files.
  • Loading branch information
kacf authored Sep 23, 2024
2 parents dc5ecd9 + 4d36b45 commit 9c54159
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions meta-mender-qemu/scripts/docker/ext4_manipulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def get(remote_path, local_path, rootfs):
stderr=subprocess.STDOUT)

def put(local_path, remote_path, rootfs, remote_path_mkdir_p=False):
# Debugfs doesn't produce error if a file doesn't exist, so let's check that first.
assert os.path.exists(local_path), f"\"{local_path}\" doesn't exist"

proc = subprocess.Popen(["debugfs", "-w", rootfs], stdin=subprocess.PIPE,
stderr=subprocess.STDOUT)
if remote_path_mkdir_p:
Expand Down

0 comments on commit 9c54159

Please sign in to comment.