Skip to content

Commit c6831e6

Browse files
authored
Merge pull request #7 from benjamin1313/uuu-symlink-fix
Uuu symlink fix
2 parents e192f81 + 5c89dcf commit c6831e6

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

labgrid/driver/usbloader.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,23 +189,20 @@ def load(self, filename=None):
189189

190190
rpath = f"{self.get_user_cache_path()}/"
191191
stdout, stderr, returncode = conn.run(f"mktemp -d {rpath}uuu.XXXXXXXX")
192-
print(stdout)
193-
print(stderr)
194192
link_path = stdout[0]
195193

196194
for file in self.extra_files:
197195
resource = ManagedFile(file, self.loader)
198196
resource.sync_to_resource(symlink=f"{link_path}/{os.path.basename(file)}")
199-
print(resource.get_remote_path())
200197

198+
symlink_path = f"{link_path}/{os.path.basename(filename)}" if link_path != None else None
201199
if filename is None and self.image is not None:
202200
filename = self.target.env.config.get_image_path(self.image)
203201
mf = ManagedFile(filename, self.loader)
204-
mf.sync_to_resource(symlink=f"{link_path}/{os.path.basename(filename)}")
205-
print(mf.get_remote_path())
202+
mf.sync_to_resource(symlink=symlink_path)
206203

207204
cmd = ['-b', self.script] if self.script else []
208-
path = [f"{link_path}/{os.path.basename(filename)}"] if link_path != None else [mf.get_remote_path()]
205+
path = [symlink_path] if link_path != None else [mf.get_remote_path()]
209206

210207
processwrapper.check_output(
211208
self.loader.command_prefix + [self.tool] + cmd + path,

0 commit comments

Comments
 (0)