Skip to content

Commit b89405e

Browse files
authored
Merge pull request #1 from jhultgre/jhultgre-encoding-fix-for-ints
Only try to encode strings
2 parents 5dadfc8 + 94053f8 commit b89405e

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)