Skip to content

Commit 58d7355

Browse files
rwb27bprobert97
andauthored
Explicitly cast to string, rather than assume.
Co-authored-by: Beth <167304066+bprobert97@users.noreply.github.com>
1 parent 631bcf3 commit 58d7355

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/labthings_fastapi/thing_slots.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def connect(
288288
# an error.
289289
raise ThingSlotError("it can't connect to multiple Things")
290290
except (ThingSlotError, KeyError) as e:
291-
reason = e.args[0]
291+
reason = str(e.args[0])
292292
if isinstance(e, KeyError):
293293
reason += " is not the name of a Thing"
294294
msg = f"Can't connect '{host.name}.{self.name}' because {reason}. "

0 commit comments

Comments
 (0)