[autotest] Clean up _format_anchor_text()
BUG=chromium:672348
TEST=None
Change-Id: I7dccf0d9ddc15c4118a1d26e15a2a0af77233bcf
Reviewed-on: https://chromium-review.googlesource.com/566074
Commit-Ready: Allen Li <ayatane@chromium.org>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
diff --git a/site_utils/run_suite.py b/site_utils/run_suite.py
index 8629617..63487cc 100755
--- a/site_utils/run_suite.py
+++ b/site_utils/run_suite.py
@@ -527,16 +527,13 @@
"""Format anchor text given a prefix and info strings.
@param prefix The prefix of the anchor text.
- @param info_strings The infos presented in the anchor text.
+ @param info_strings Iterable of strings.
@return A anchor_text with the right prefix and info strings.
"""
- anchor_text = '[{prefix}]: {anchor}'.format(
+ return '[{prefix}]: {anchor}: {info}'.format(
prefix=prefix,
- anchor=self.anchor.strip())
- if info_strings:
- info_text = ', '.join(info_strings)
- anchor_text += ': ' + info_text
- return anchor_text
+ anchor=self.anchor.strip(),
+ info=', '.join(info_strings))
@property
def text_link(self):