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

Issue 1152443004: Add quotes around command line in subproccess error message (Closed)

Created:
5 years, 6 months ago by Sam Clegg
Modified:
5 years, 6 months ago
Reviewers:
iannucci, M-A Ruel
CC:
chromium-reviews, dpranke+depot_tools_chromium.org, iannucci+depot_tools_chromium.org
Target Ref:
refs/heads/master
Project:
tools
Visibility:
Public.

Description

Add quotes around command line in subproccess error message Allows the command line itself to be distinguished from the surrounding error message. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=295481

Patch Set 1 #

Patch Set 2 : use %r #

Patch Set 3 : #

Total comments: 4

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -3 lines) Patch
M subprocess2.py View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M tests/gclient_smoketest.py View 1 2 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (5 generated)
Sam Clegg
5 years, 6 months ago (2015-06-01 21:34:37 UTC) #2
chromium-reviews
If you use %r python will quote it for you. On Mon, Jun 1, 2015, ...
5 years, 6 months ago (2015-06-01 21:38:38 UTC) #3
Sam Clegg
On 2015/06/01 21:38:38, chromium-reviews wrote: > If you use %r python will quote it for ...
5 years, 6 months ago (2015-06-01 21:47:15 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1152443004/40001
5 years, 6 months ago (2015-06-01 21:48:08 UTC) #6
commit-bot: I haz the power
Dry run: Presubmit check for 1152443004-40001 failed and returned exit status 1. Running presubmit commit ...
5 years, 6 months ago (2015-06-01 21:50:49 UTC) #8
iannucci
In general I prefer %r because it means that you still get a comprehensible thing ...
5 years, 6 months ago (2015-06-01 21:51:58 UTC) #10
Sam Clegg
https://codereview.chromium.org/1152443004/diff/40001/subprocess2.py File subprocess2.py (right): https://codereview.chromium.org/1152443004/diff/40001/subprocess2.py#newcode43 subprocess2.py:43: out = "Command %r returned non-zero exit status %s" ...
5 years, 6 months ago (2015-06-01 21:58:45 UTC) #11
Sam Clegg
5 years, 6 months ago (2015-06-01 21:58:49 UTC) #12
iannucci
Ah, yeah it's fine for single quotes. I usually use backticks for this purpose though: ...
5 years, 6 months ago (2015-06-01 22:05:45 UTC) #13
iannucci
lgtm
5 years, 6 months ago (2015-06-01 22:05:59 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1152443004/60001
5 years, 6 months ago (2015-06-01 22:07:17 UTC) #16
commit-bot: I haz the power
5 years, 6 months ago (2015-06-01 22:10:16 UTC) #17
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
http://src.chromium.org/viewvc/chrome?view=rev&revision=295481

Powered by Google App Engine
This is Rietveld 408576698