Skip to content

Commit

Permalink
Change Ubuntu 22.* error code for mountpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
abejgonzalez authored Aug 29, 2024
1 parent 8dd1c18 commit 8cea603
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wlutil/wlutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,8 @@ def mountImg(imgPath, mntPath):

assert imgPath.is_file(), f"Unable to find {imgPath} to mount"
ret = run(["mountpoint", mntPath], check=False).returncode
# mountpoint on Ubuntu 20.* returns 1 (on 22.* it returns 130) for an empty folder
assert ret == 1 or ret == 130, f"{mntPath} already mounted. Somethings wrong"
# mountpoint on Ubuntu 20.* returns 1 (on 22.* it returns 32) for an empty folder
assert ret == 1 or ret == 32, f"{mntPath} already mounted. Somethings wrong"

uid = sp.run(['id', '-u'], capture_output=True, text=True).stdout.strip()
gid = sp.run(['id', '-g'], capture_output=True, text=True).stdout.strip()
Expand Down

0 comments on commit 8cea603

Please sign in to comment.