4
0
Fork 2
mirror of https://gerrit.hackerspace.pl/hscloud synced 2024-10-15 06:47:45 +00:00

tools/hscloud/lib.py: fix newlines sneaking in

Change-Id: Iacf956c80486596f02efd901c48f4571f0a76adf
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1283
Reviewed-by: q3k <q3k@hackerspace.pl>
This commit is contained in:
q3k 2022-04-04 17:49:38 +00:00 committed by q3k
parent 42c17872fd
commit 2ada80423a

View file

@ -25,12 +25,12 @@ def tool_location():
rloc = r.Rlocation("hscloud/tools/hscloud/hscloud_/hscloud")
if rloc is None:
raise Exception("Could not find location of hscloud - are you in a valid checkout?")
return rloc
return rloc.strip()
def workspace_location():
"""Return an absolute path to the hscloud checkout."""
return subprocess.check_output([tool_location(), "workspace"]).decode()
return subprocess.check_output([tool_location(), "workspace"]).decode().strip()
def must_rlocation(runfile):
@ -42,4 +42,4 @@ def must_rlocation(runfile):
if manifest != "":
msg += f"; manifest file: {manifest}"
raise Exception(msg)
return rloc
return rloc.strip()