Fork 0

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>
q3k 2022-04-04 17:49:38 +00:00 committed by q3k
parent 42c17872fd
commit 2ada80423a
1 changed files with 3 additions and 3 deletions

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()