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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/net/file_uploader.py

Issue 2248653002: Revert of Fix pylint warnings in webkitpy/common/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Manual Revert (Patch Set 1 causes patch failure in read_checksum_from_png_unittest.py) Created 4 years, 4 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
Index: third_party/WebKit/Tools/Scripts/webkitpy/common/net/file_uploader.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/net/file_uploader.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/net/file_uploader.py
index 7d20043de82cdb2adb081b20cf28e4bd8178f6a5..d12f78c360288122770a7ca81f4c8b2e2133d1ce 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/net/file_uploader.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/net/file_uploader.py
@@ -50,12 +50,12 @@ def _encode_multipart_form_data(fields, files):
Source:
http://code.google.com/p/rietveld/source/browse/trunk/upload.py
"""
- boundary = '-M-A-G-I-C---B-O-U-N-D-A-R-Y-'
+ BOUNDARY = '-M-A-G-I-C---B-O-U-N-D-A-R-Y-'
CRLF = '\r\n'
lines = []
for key, value in fields:
- lines.append('--' + boundary)
+ lines.append('--' + BOUNDARY)
lines.append('Content-Disposition: form-data; name="%s"' % key)
lines.append('')
if isinstance(value, unicode):
@@ -63,7 +63,7 @@ def _encode_multipart_form_data(fields, files):
lines.append(value)
for key, filename, value in files:
- lines.append('--' + boundary)
+ lines.append('--' + BOUNDARY)
lines.append('Content-Disposition: form-data; name="%s"; filename="%s"' % (key, filename))
lines.append('Content-Type: %s' % get_mime_type(filename))
lines.append('')
@@ -71,10 +71,10 @@ def _encode_multipart_form_data(fields, files):
value = value.encode('utf-8')
lines.append(value)
- lines.append('--' + boundary + '--')
+ lines.append('--' + BOUNDARY + '--')
lines.append('')
body = CRLF.join(lines)
- content_type = 'multipart/form-data; boundary=%s' % boundary
+ content_type = 'multipart/form-data; boundary=%s' % BOUNDARY
return content_type, body

Powered by Google App Engine
This is Rietveld 408576698