Skip to content

Commit

Permalink
Merge pull request #1181 from jluebbe/usbloader-output
Browse files Browse the repository at this point in the history
driver/usbloader: enable print_on_silent_log for subprocess calls
  • Loading branch information
Emantor committed May 16, 2023
2 parents acecf4c + 94c3437 commit 2f00b39
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions labgrid/driver/usbloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def load(self, filename=None):
mf.sync_to_resource()

processwrapper.check_output(
self.loader.command_prefix + [self.tool, "0", mf.get_remote_path()]
self.loader.command_prefix + [self.tool, "0", mf.get_remote_path()],
print_on_silent_log=True
)


Expand Down Expand Up @@ -79,7 +80,8 @@ def load(self, filename=None):

processwrapper.check_output(
self.loader.command_prefix +
[self.tool, "-p", str(self.loader.path), "-c", mf.get_remote_path()]
[self.tool, "-p", str(self.loader.path), "-c", mf.get_remote_path()],
print_on_silent_log=True
)


Expand Down Expand Up @@ -120,7 +122,8 @@ def load(self, filename=None):
try:
processwrapper.check_output(
self.loader.command_prefix +
[self.tool, 'db', mf.get_remote_path()]
[self.tool, 'db', mf.get_remote_path()],
print_on_silent_log=True
)
break
except subprocess.CalledProcessError:
Expand All @@ -137,7 +140,8 @@ def load(self, filename=None):
try:
processwrapper.check_output(
self.loader.command_prefix +
[self.tool, 'wl', '0x40', mf.get_remote_path()]
[self.tool, 'wl', '0x40', mf.get_remote_path()],
print_on_silent_log=True
)
break
except subprocess.CalledProcessError:
Expand Down Expand Up @@ -180,7 +184,8 @@ def load(self, filename=None):
cmd = ['-b', self.script] if self.script else []

processwrapper.check_output(
self.loader.command_prefix + [self.tool] + cmd + [mf.get_remote_path()]
self.loader.command_prefix + [self.tool] + cmd + [mf.get_remote_path()],
print_on_silent_log=True
)


Expand Down Expand Up @@ -225,5 +230,6 @@ def load(self, filename):
f"--bus={self.loader.busnum}",
f"--device={self.loader.devnum}",
mf.get_remote_path(),
]
],
print_on_silent_log=True
)

0 comments on commit 2f00b39

Please sign in to comment.