Don't use bare 'except:'
[youtube-dl] / youtube_dl / YoutubeDL.py
index b5ef5e009f972cb9308bf5c09c561ce393c05a2a..640b8c99d75d6215b232c0d2d678dd903f41e8bb 100755 (executable)
@@ -1701,10 +1701,10 @@ class YoutubeDL(object):
             out = out.decode().strip()
             if re.match('[0-9a-f]+', out):
                 self._write_string('[debug] Git HEAD: ' + out + '\n')
-        except:
+        except Exception:
             try:
                 sys.exc_clear()
-            except:
+            except Exception:
                 pass
         self._write_string('[debug] Python version %s - %s\n' % (
             platform.python_version(), platform_name()))