diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-11-22 19:15:36 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-11-22 19:15:36 +0100 |
commit | 0b63aed8dfd36a5a7f5ae6518b9c385d9a43e735 (patch) | |
tree | 94ccd4485fc38a35b974190a5509ffed43d26274 | |
parent | 15c3adbb161a5ef17f6f7acf3030620bc11fd058 (diff) |
[update] do not assign to unused variables
-rw-r--r-- | youtube_dl/update.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/youtube_dl/update.py b/youtube_dl/update.py index f41b4785a..e5f441707 100644 --- a/youtube_dl/update.py +++ b/youtube_dl/update.py @@ -109,7 +109,7 @@ def update_self(to_screen, verbose): urlh = compat_urllib_request.urlopen(version['exe'][0]) newcontent = urlh.read() urlh.close() - except (IOError, OSError) as err: + except (IOError, OSError): if verbose: to_screen(compat_str(traceback.format_exc())) to_screen(u'ERROR: unable to download latest version') return @@ -122,7 +122,7 @@ def update_self(to_screen, verbose): try: with open(exe + '.new', 'wb') as outf: outf.write(newcontent) - except (IOError, OSError) as err: + except (IOError, OSError): if verbose: to_screen(compat_str(traceback.format_exc())) to_screen(u'ERROR: unable to write the new version') return @@ -141,7 +141,7 @@ start /b "" cmd /c del "%%~f0"&exit /b" subprocess.Popen([bat]) # Continues to run in the background return # Do not show premature success messages - except (IOError, OSError) as err: + except (IOError, OSError): if verbose: to_screen(compat_str(traceback.format_exc())) to_screen(u'ERROR: unable to overwrite current version') return @@ -152,7 +152,7 @@ start /b "" cmd /c del "%%~f0"&exit /b" urlh = compat_urllib_request.urlopen(version['bin'][0]) newcontent = urlh.read() urlh.close() - except (IOError, OSError) as err: + except (IOError, OSError): if verbose: to_screen(compat_str(traceback.format_exc())) to_screen(u'ERROR: unable to download latest version') return @@ -165,7 +165,7 @@ start /b "" cmd /c del "%%~f0"&exit /b" try: with open(filename, 'wb') as outf: outf.write(newcontent) - except (IOError, OSError) as err: + except (IOError, OSError): if verbose: to_screen(compat_str(traceback.format_exc())) to_screen(u'ERROR: unable to overwrite current version') return |