X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Futils.py;h=c486ef8ecfef9772aaabdb3863a2814349a296b7;hb=6a656a843a629ceef6979976a353d177c97b9527;hp=caec00e373898bd8a955e96ea8dfdbbb0831d7aa;hpb=79d09f47c2abafe94c36d5c6718038c854748360;p=youtube-dl diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index caec00e37..c486ef8ec 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -553,7 +553,7 @@ def make_HTTPS_handler(opts_no_check_certificate): self._tunnel() try: self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, ssl_version=ssl.PROTOCOL_SSLv3) - except ssl.SSLError as e: + except ssl.SSLError: self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, ssl_version=ssl.PROTOCOL_SSLv23) class HTTPSHandlerV3(compat_urllib_request.HTTPSHandler): @@ -1009,11 +1009,6 @@ def unsmuggle_url(smug_url): return url, data -def parse_xml_doc(s): - assert isinstance(s, type(u'')) - return xml.etree.ElementTree.fromstring(s.encode('utf-8')) - - def format_bytes(bytes): if bytes is None: return u'N/A'