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

Unified Diff: trychange.py

Issue 19552004: Improve description layout. Improve coloring and add legend in help. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: cleaner Created 7 years, 5 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 | « tests/trychange_unittest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trychange.py
diff --git a/trychange.py b/trychange.py
index f67adef2c1198081726fdb187ea3bde35d2fa446..d0cdab69f8db857545ac9a034bd0174fca2fa540 100755
--- a/trychange.py
+++ b/trychange.py
@@ -524,11 +524,15 @@ def GetMungedDiff(path_diff, diff):
return (diff, changed_files)
+class OptionParser(optparse.OptionParser):
+ def format_epilog(self, _):
+ """Removes epilog formatting."""
+ return self.epilog or ''
+
+
def gen_parser(prog):
# Parse argv
- parser = optparse.OptionParser(usage=USAGE,
- version=__version__,
- prog=prog)
+ parser = OptionParser(usage=USAGE, version=__version__, prog=prog)
parser.add_option("-v", "--verbose", action="count", default=0,
help="Prints debugging infos")
group = optparse.OptionGroup(parser, "Result and status")
@@ -675,8 +679,6 @@ def TryChange(argv,
if extra_epilog:
epilog += extra_epilog
parser.epilog = epilog
- # Remove epilog formatting
- parser.format_epilog = lambda x: parser.epilog
options, args = parser.parse_args(argv)
« no previous file with comments | « tests/trychange_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698