diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2017-05-06 19:06:18 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2017-05-06 19:06:18 +0800 |
commit | 10c87c151b6f6a2f45b1a3ad1ac2d38fcf0fb0a6 (patch) | |
tree | 5e9ce760a6966ef43932346cb139c19ae6d286fb /youtube_dl/utils.py | |
parent | 228cd9bb906eb1dae476a05dbff0796a2d9f9be5 (diff) |
[utils] Rename try_multipart_encode to _multipart_encode_impl
To state that this is an internal function and people should be careful
when using it outside youtube-dl.
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r-- | youtube_dl/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 911cacd29..aa1900436 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -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: |