Skip to content

Commit d6d20d7

Browse files
Merge pull request #1676 from Bastian-Krause/bst/fix-error-messages
Fix Messages with Unevaluated Variables
2 parents d7903e2 + ca8d184 commit d6d20d7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

labgrid/driver/power/mfi_mpower.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def power_get(host, port, index):
9191
elif port['output'] == 1:
9292
return True
9393
else:
94-
raise ExecutionError("unexpected port output value: '{port['output']}'")
94+
raise ExecutionError(f"unexpected port output value: '{port['output']}'")
9595
else:
9696
raise ExecutionError(f"unexpected http response: code {r.status_code}, content type '{r.headers['Content-Type']}' and content: '{r.text}'")
9797

labgrid/remote/coordinator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ async def _acquire_resource(self, place, resource):
626626
self.get_exporter_by_name(resource.path[0]).queue.put_nowait(cmd)
627627
await cmd.wait()
628628
if not cmd.response.success:
629-
raise ExporterError("failed to acquire {resource} ({cmd.response.reason})")
629+
raise ExporterError(f"failed to acquire {resource} ({cmd.response.reason})")
630630
if resource.acquired != place.name:
631631
logging.warning("resource %s not acquired by this place after acquire request", resource)
632632

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def __init__(self, cwd):
5555
self.reader = None
5656

5757
def stop(self):
58-
logging.info("stopping {self.__class__.__name__} pid=%s", self.spawn.pid)
58+
logging.info("stopping %s pid=%s", self.__class__.__name__, self.spawn.pid)
5959

6060
# let coverage write its data:
6161
# https://coverage.readthedocs.io/en/latest/subprocess.html#process-termination

0 commit comments

Comments
 (0)