Skip to content

Commit

Permalink
Merge 257c42e into b2d32f0
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarryd Tilbrook committed Nov 4, 2017
2 parents b2d32f0 + 257c42e commit 6cecc31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mopidy/m3u/playlists.py
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 6cecc31

Please sign in to comment.