Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Unified Diff: presubmit_support.py

Issue 118521: Make AffectedFile usable as items. (Closed)
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_support.py
diff --git a/presubmit_support.py b/presubmit_support.py
index e58b8bdd949c3a2328f82ca133258d7f2b52393c..58129c1e4ac4dd7293be1301ff57f0b41870b8b1 100755
--- a/presubmit_support.py
+++ b/presubmit_support.py
@@ -89,7 +89,7 @@ class OutputApi(object):
output_stream.write(self._message)
output_stream.write('\n')
for item in self._items:
- output_stream.write(' %s\n' % item)
+ output_stream.write(' %s\n' % str(item))
if self._long_text:
output_stream.write('\n***************\n%s\n***************\n' %
self._long_text)
@@ -435,6 +435,9 @@ class AffectedFile(object):
"""
raise NotImplementedError() # Implement if/when needed.
+ def __str__(self):
+ return self.LocalPath()
+
class SvnAffectedFile(AffectedFile):
"""Representation of a file in a change out of a Subversion checkout."""
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698