You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/06/25 12:11:12 UTC

[GitHub] [kafka] cadonna commented on a change in pull request #8914: MINOR: Do not swallow exception when collecting PIDs

cadonna commented on a change in pull request #8914:
URL: https://github.com/apache/kafka/pull/8914#discussion_r445510575



##########
File path: tests/kafkatest/services/streams.py
##########
@@ -215,8 +216,11 @@ def node(self):
 
     def pids(self, node):
         try:
-            return [pid for pid in node.account.ssh_capture("cat " + self.PID_FILE, callback=int)]
-        except:
+            pids = [pid for pid in node.account.ssh_capture("cat " + self.PID_FILE, callback=str)]
+            return [int(pid) for pid in pids]

Review comment:
       I need to do this because otherwise the callback `int` will throw an exception when an error occured in `ssh_capture()` that returned an error message.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org