From 39019f5df0b7193ac7fe959a7353e25eb2d0f593 Mon Sep 17 00:00:00 2001 From: Gilles Grandou Date: Mon, 4 Dec 2023 23:44:43 +0100 Subject: [PATCH] bug fix osname when using symlink to runon --- runon/runon.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/runon/runon.py b/runon/runon.py index 9bd61e8..2d35055 100755 --- a/runon/runon.py +++ b/runon/runon.py @@ -202,12 +202,10 @@ def run_container(client, container): def main(): osname = None run_name = os.path.basename(os.sys.argv[0]) - if run_name == 'runos': + if run_name == "runon": pass - elif run_name.startswith('runon'): - m = re.match('runon[-_]?(.*)$', run_name) - if m: - osname = m[1] + elif run_name.startswith("runon_"): + osname = run_name[len("runon_"):] else: osname = run_name