Skip to content

Commit 45e107c

Browse files
authored
Merge pull request #4 from shuaibingn/master
fix bug when using encoding
2 parents eeaa129 + 50ab8cd commit 45e107c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

P4.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,9 @@ def run(self, *args, **kargs):
590590
setattr(self, k, v)
591591

592592
flatArgs = self.__flatten(args)
593+
594+
if self.logger:
595+
self.logger.info("p4 " + " ".join(flatArgs))
593596

594597
# if encoding is set, translate to Bytes
595598
if hasattr(self,"encoding") and self.encoding and not self.encoding == 'raw':
@@ -601,9 +604,6 @@ def run(self, *args, **kargs):
601604
result.append(s)
602605
flatArgs = result
603606

604-
if self.logger:
605-
self.logger.info("p4 " + " ".join(flatArgs))
606-
607607
try:
608608
result = P4API.P4Adapter.run(self, *flatArgs)
609609
except P4Exception as e:

0 commit comments

Comments
 (0)