Title: [113562] trunk/Tools
Revision
113562
Author
[email protected]
Date
2012-04-09 02:22:44 -0700 (Mon, 09 Apr 2012)

Log Message

webkitpy: use the filesystem object properly in fileuploader
https://bugs.webkit.org/show_bug.cgi?id=83326

Reviewed by Adam Barth.

We should be using the filesystem object rather than the codecs
object.

* Scripts/webkitpy/common/net/file_uploader.py:
(FileUploader.upload_as_multipart_form_data):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (113561 => 113562)


--- trunk/Tools/ChangeLog	2012-04-09 09:05:50 UTC (rev 113561)
+++ trunk/Tools/ChangeLog	2012-04-09 09:22:44 UTC (rev 113562)
@@ -1,3 +1,16 @@
+2012-04-09  Dirk Pranke  <[email protected]>
+
+        webkitpy: use the filesystem object properly in fileuploader
+        https://bugs.webkit.org/show_bug.cgi?id=83326
+
+        Reviewed by Adam Barth.
+
+        We should be using the filesystem object rather than the codecs
+        object.
+
+        * Scripts/webkitpy/common/net/file_uploader.py:
+        (FileUploader.upload_as_multipart_form_data):
+
 2012-04-09  Eric Seidel  <[email protected]>
 
         Enable webkit_unit_tests for commit queue and EWS while tracking failures

Modified: trunk/Tools/Scripts/webkitpy/common/net/file_uploader.py (113561 => 113562)


--- trunk/Tools/Scripts/webkitpy/common/net/file_uploader.py	2012-04-09 09:05:50 UTC (rev 113561)
+++ trunk/Tools/Scripts/webkitpy/common/net/file_uploader.py	2012-04-09 09:22:44 UTC (rev 113562)
@@ -27,7 +27,6 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-import codecs
 import mimetypes
 import time
 import urllib2
@@ -93,9 +92,7 @@
     def upload_as_multipart_form_data(self, filesystem, files, attrs):
         file_objs = []
         for filename, path in files:
-            # FIXME: We should talk to the filesytem via a Host object.
-            with codecs.open(path, "rb") as file:
-                file_objs.append(('file', filename, file.read()))
+            file_objs.append(('file', filename, filesystem.read_binary_file(path)))
 
         # FIXME: We should use the same variable names for the formal and actual parameters.
         content_type, data = "" file_objs)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to