From 552c31baf2cf957a9c79abb25bee2289f6a51910 Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Wed, 10 Sep 2014 11:08:06 +0000 Subject: [PATCH] Fix ascii art escaping. This was done because a line ending with a '\' will not be printed properly. Completely escape the string. R=stip@chromium.org BUG= Review URL: https://codereview.chromium.org/557143002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291906 0039d316-1c4b-4281-b951-d872f2087c98 --- git_cl.py | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/git_cl.py b/git_cl.py index a9b237652a..69af5455bc 100755 --- a/git_cl.py +++ b/git_cl.py @@ -2777,24 +2777,25 @@ def CMDformat(parser, args): def CMDlol(parser, args): # This command is intentionally undocumented. - print(""" / / - (\/_//`) - / '/ - 0 0 \ - / \ - / __/ \ - /, _/ \ \_ - `-./ ) | ~^~^~^~^~^~^~^~\~. - ( / \_} - | / | - ; | \ / - \/ ,/ \ | - / /~~|~|~~~~~~|~|\ | - / / | | | | `\ \ - / / | | | | \ \ - / ( | | | | \ \ - jgs /,_) /__) /__) /,_/ - '''''"""""'''""""""'''""""""''"""""''''' """) + print('\n'.join(( + ' / /', + ' (\\/_//`)', + ' / \'/', + ' 0 0 \\', + ' / \\', + ' / __/ \\', + ' /, _/ \\ \\_', + ' `-./ ) | ~^~^~^~^~^~^~^~\\~.', + ' ( / \\_}', + ' | / |', + ' ; | \\ /', + ' \\/ ,/ \\ |', + ' / /~~|~|~~~~~~|~|\\ |', + ' / / | | | | `\\ \\', + ' / / | | | | \\ \\', + ' / ( | | | | \\ \\', + ' jgs /,_) /__) /__) /,_/', + ' \'\'\'\'\'"""""\'\'\'""""""\'\'\'""""""\'\'"""""\'\'\'\'\''))) return 0