Ignore errors in git error handling in verbose mode in Python 3
authorPhilipp Hagemeister <phihag@phihag.de>
Tue, 16 Jul 2013 23:33:28 +0000 (01:33 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Tue, 16 Jul 2013 23:33:28 +0000 (01:33 +0200)
youtube_dl/__init__.py

index 4628ae9332280932c7cb9e0ec83a47b27afe8d6d..31427f7c52fa56db4213fd6906b7e60d4c9345aa 100644 (file)
@@ -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')