cf-natali commented on a change in pull request #416:
URL: https://github.com/apache/mesos/pull/416#discussion_r768027990



##########
File path: src/python/cli_new/lib/cli/plugins/task/main.py
##########
@@ -143,3 +148,25 @@ def list(self, argv):
                                .format(error=exception))
 
         print(str(table))
+
+    def inspect(self, argv):
+        """
+        Show the low-level information of the task.
+        """
+        try:
+            master = self.config.master()
+        except Exception as exception:
+            raise CLIException("Unable to get leading master address: {error}"
+                               .format(error=exception))
+
+        data = get_tasks(master, self.config)
+        try:
+            for task in data:
+                if task["id"] != argv["<task_id>"]:
+                    continue
+
+                print(json.dumps(task, indent=4))
+
+        except Exception as exception:

Review comment:
       Can anything actually throw here?
   I think it'd be fine to remove the except clause.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to