]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[utils] Rename try_multipart_encode to _multipart_encode_impl
authorYen Chi Hsuan <yan12125@gmail.com>
Sat, 6 May 2017 11:06:18 +0000 (19:06 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Sat, 6 May 2017 11:06:18 +0000 (19:06 +0800)
To state that this is an internal function and people should be careful
when using it outside youtube-dl.

youtube_dl/utils.py

index 911cacd29ecf26e3f3ed0d48c1265496454a74dc..aa1900436f02b0f8c9845df0cab2ec35fcaac4ef 100644 (file)
@@ -2098,7 +2098,7 @@ def update_Request(req, url=None, data=None, headers={}, query={}):
     return new_req
 
 
-def try_multipart_encode(data, boundary):
+def _multipart_encode_impl(data, boundary):
     content_type = 'multipart/form-data; boundary=%s' % boundary
 
     out = b''
@@ -2140,7 +2140,7 @@ def multipart_encode(data, boundary=None):
             boundary = '---------------' + str(random.randrange(0x0fffffff, 0xffffffff))
 
         try:
-            out, content_type = try_multipart_encode(data, boundary)
+            out, content_type = _multipart_encode_impl(data, boundary)
             break
         except ValueError:
             if has_specified_boundary: