From de29c4144edf35c432e6356f2f9df561061eda50 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Wed, 17 Jul 2013 01:33:28 +0200 Subject: [PATCH] Ignore errors in git error handling in verbose mode in Python 3 --- youtube_dl/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 4628ae933..31427f7c5 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -591,7 +591,10 @@ def _real_main(argv=None): if re.match('[0-9a-f]+', out): sys.stderr.write(u'[debug] Git HEAD: ' + out + u'\n') except: - sys.exc_clear() + try: + sys.exc_clear() + except: + pass sys.stderr.write(u'[debug] Python version %s - %s' %(platform.python_version(), platform.platform()) + u'\n') sys.stderr.write(u'[debug] Proxy map: ' + str(proxy_handler.proxies) + u'\n') -- 2.39.5