aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/update.py
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2015-03-27 13:02:20 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2015-03-27 13:02:20 +0100
commit70a1165b32acf253905109e9b4f245295d67af1f (patch)
treed217fe80bed21e76accf73cd767804b231d1fe93 /youtube_dl/update.py
parentaf140002158c1079b1365392c6a48ea06ad23c82 (diff)
Don't use bare 'except:'
They catch any exception, including KeyboardInterrupt, we don't want to catch it.
Diffstat (limited to 'youtube_dl/update.py')
-rw-r--r--youtube_dl/update.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/update.py b/youtube_dl/update.py
index d8be4049f..de3169eef 100644
--- a/youtube_dl/update.py
+++ b/youtube_dl/update.py
@@ -65,7 +65,7 @@ def update_self(to_screen, verbose):
# Check if there is a new version
try:
newversion = opener.open(VERSION_URL).read().decode('utf-8').strip()
- except:
+ except Exception:
if verbose:
to_screen(compat_str(traceback.format_exc()))
to_screen('ERROR: can\'t find the current version. Please try again later.')
@@ -78,7 +78,7 @@ def update_self(to_screen, verbose):
try:
versions_info = opener.open(JSON_URL).read().decode('utf-8')
versions_info = json.loads(versions_info)
- except:
+ except Exception:
if verbose:
to_screen(compat_str(traceback.format_exc()))
to_screen('ERROR: can\'t obtain versions info. Please try again later.')