From 257c42e11160dc90fcf03f17917aac2be9d88cc7 Mon Sep 17 00:00:00 2001 From: jradtilbrook Date: Sat, 4 Nov 2017 19:57:45 +0800 Subject: [PATCH] flake8: fix bare except clause --- mopidy/m3u/playlists.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mopidy/m3u/playlists.py b/mopidy/m3u/playlists.py index 28be28d9..fe83f663 100644 --- a/mopidy/m3u/playlists.py +++ b/mopidy/m3u/playlists.py @@ -34,7 +34,7 @@ def replace(path, mode='w+b', encoding=None, errors=None): (fd, tempname) = tempfile.mkstemp(dir=os.path.dirname(path)) try: fp = io.open(fd, mode, encoding=encoding, errors=errors) - except: + except Exception: os.remove(tempname) os.close(fd) raise @@ -43,7 +43,7 @@ def replace(path, mode='w+b', encoding=None, errors=None): fp.flush() os.fsync(fd) os.rename(tempname, path) - except: + except Exception: os.remove(tempname) raise finally: