Repository: google/turbinia

Issue:
turbinia-client status summary formatting warning
Running turbini-client status summary might yield the following warning for some requests:

```WARNING turbinia - Error formatting the Markdown report: unsupported format string passed to NoneType.__format__```


Discussion:

Resolving patch:
diff --git a/turbinia/api/cli/turbinia_client/helpers/formatter.py b/turbinia/api/cli/turbinia_client/helpers/formatter.py
--- a/turbinia/api/cli/turbinia_client/helpers/formatter.py
+++ b/turbinia/api/cli/turbinia_client/helpers/formatter.py
@@ -194,7 +194,7 @@ def generate_markdown(self) -> str:
       report.append(self.heading2(task.get('name')))
       line = f"{self.bold('Evidence:'):s} {task.get('evidence_name')!s}"
       report.append(self.bullet(line))
-      line = f"{self.bold('Status:'):s} {task.get('status'):s}"
+      line = f"{self.bold('Status:'):s} {task.get('status')!s}"
       report.append(self.bullet(line))
       report.append(self.bullet(f"Task Id: {task.get('id')!s}"))
       report.append(
@@ -253,27 +253,26 @@ def generate_markdown(self) -> str:
 
     try:
       report.append(
-          self.heading2(f"Request ID: {request_dict.get('request_id')!s}"))
+          self.heading2(f"Request ID: {request_dict.get('request_id')}"))
       report.append(
           self.bullet(
-              f"Last Update: {request_dict.get('last_task_update_time')!s}"))
+              f"Last Update: {request_dict.get('last_task_update_time')}"))
+      report.append(self.bullet(f"Requester: {request_dict.get('requester')}"))
+      report.append(self.bullet(f"Reason: {request_dict.get('reason')}"))
+      report.append(self.bullet(f"Status: {request_dict.get('status')}"))
       report.append(
-          self.bullet(f"Requester: {request_dict.get('requester')!s}"))
-      report.append(self.bullet(f"Reason: {request_dict.get('reason')!s}"))
-      report.append(self.bullet(f"Status: {request_dict.get('status')!s}"))
+          self.bullet(f"Failed tasks: {request_dict.get('failed_tasks')}"))
       report.append(
-          self.bullet(f"Failed tasks: {request_dict.get('failed_tasks'):d}"))
-      report.append(
-          self.bullet(f"Running tasks: {request_dict.get('running_tasks'):d}"))
+          self.bullet(f"Running tasks: {request_dict.get('running_tasks')}"))
       report.append(
           self.bullet(
-              f"Successful tasks: {request_dict.get('successful_tasks'):d}"))
+              f"Successful tasks: {request_dict.get('successful_tasks')}"))
       report.append(
-          self.bullet(f"Task Count: {request_dict.get('task_count'):d}"))
+          self.bullet(f"Task Count: {request_dict.get('task_count')}"))
       report.append(
-          self.bullet(f"Queued tasks: {request_dict.get('queued_tasks'):d}"))
+          self.bullet(f"Queued tasks: {request_dict.get('queued_tasks')}"))
       report.append(
-          self.bullet(f"Evidence Name: {request_dict.get('evidence_name'):d}"))
+          self.bullet(f"Evidence Name: {request_dict.get('evidence_name')}"))
       report.append('')
     except TypeError as exception:
       log.warning(f'Error formatting the Markdown report: {exception!s}')


Test patch: