Fix bug in local coverage script when only when profdata file is given as input

Change-Id: Ic066801f88ee61027028362bc37a4742e268a1d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4556140
Auto-Submit: Prakhar Asthana <[email protected]>
Commit-Queue: Prakhar Asthana <[email protected]>
Commit-Queue: Benjamin Joyce (Ben) <[email protected]>
Reviewed-by: Benjamin Joyce (Ben) <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1148107}
diff --git a/tools/code_coverage/coverage.py b/tools/code_coverage/coverage.py
index 0f481786..15b4e88 100755
--- a/tools/code_coverage/coverage.py
+++ b/tools/code_coverage/coverage.py
@@ -1135,7 +1135,7 @@
     # An input prof-data file(s) is already provided.
     if len(args.profdata_file) == 1:
       # If it's just one input file, use as-is.
-      profdata_file_path = args.profdata_file
+      profdata_file_path = args.profdata_file[0]
     else:
       # Otherwise, there are multiple profdata files and we need to merge them.
       profdata_file_path = _CreateCoverageProfileDataFromTargetProfDataFiles(args.profdata_file)