Skip to content

Commit 94053f8

Browse files
authored
Only try to encode strings
If encoding is set on the connection it was no longer able to accept ints to commands.
1 parent 3a24392 commit 94053f8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

P4.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,10 @@ def run(self, *args, **kargs):
595595
if hasattr(self,"encoding") and self.encoding and not self.encoding == 'raw':
596596
result = []
597597
for s in flatArgs:
598-
result.append( s.encode(self.encoding) )
598+
if isinstance(s, str):
599+
result.append( s.encode(self.encoding) )
600+
else:
601+
result.append(s)
599602
flatArgs = result
600603

601604
if self.logger:

0 commit comments

Comments
 (0)