From e353411292b2d5a5aa03b6454ceeda18764659c5 Mon Sep 17 00:00:00 2001 From: Stephane Thiell Date: Fri, 25 Nov 2022 14:49:42 -0800 Subject: [PATCH] EnginePort: use %s format instead of %d in __repr__() Use more robust formatting in case the streams are not initialized yet. Fixes #499. --- lib/ClusterShell/Worker/EngineClient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ClusterShell/Worker/EngineClient.py b/lib/ClusterShell/Worker/EngineClient.py index 7472d098..74185e76 100644 --- a/lib/ClusterShell/Worker/EngineClient.py +++ b/lib/ClusterShell/Worker/EngineClient.py @@ -499,7 +499,7 @@ def __repr__(self): fd_out = self.streams['out'].fd except KeyError: fd_out = None - return "<%s at 0x%s (streams=(%d, %d))>" % (self.__class__.__name__, \ + return "<%s at 0x%s (streams=(%s, %s))>" % (self.__class__.__name__, id(self), fd_in, fd_out) def _start(self):