Skip to content

Commit c56347e

Browse files
committed
util: use short ln options for Busybox compat
If the host systems run Busybox, long options may be disabled. Switch to the short options but comment them for readability. Remove the pylint comment as a bonus since the line is no longer to long! Signed-off-by: Paul Spooren <mail@aparcar.org>
1 parent 41a19d4 commit c56347e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

labgrid/util/managedfile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ def sync_to_resource(self, symlink=None):
7474
conn.run_check(f"test ! -e {symlink} -o -L {symlink}")
7575
except ExecutionError:
7676
raise ManagedFileError(f"Path {symlink} exists but is not a symlink.")
77-
conn.run_check(
78-
f"ln --symbolic --force --no-dereference {self.rpath}{os.path.basename(self.local_path)} {symlink}" # pylint: disable=line-too-long
79-
)
77+
# use short options to be compatible with busybox
78+
# --symbolic --force --no-dereference
79+
conn.run_check(f"ln -sfn {self.rpath}{os.path.basename(self.local_path)} {symlink}")
8080

8181

8282
def _on_nfs(self, conn):

0 commit comments

Comments
 (0)