Skip to content

Commit

Permalink
Specified exception type
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Dec 2, 2015
1 parent 4ab0cbb commit e9a6a96
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion PIL/EpsImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def Ghostscript(tile, size, fp, scale=1):
os.unlink(outfile)
if infile_temp:
os.unlink(infile_temp)
except:
except OSError:
pass

return im
Expand Down
2 changes: 1 addition & 1 deletion PIL/GifImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ def _save_netpbm(im, fp, filename):

try:
os.unlink(file)
except:
except OSError:
pass


Expand Down
2 changes: 1 addition & 1 deletion PIL/IptcImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def load(self):
finally:
try:
os.unlink(outfile)
except:
except OSError:
pass


Expand Down
4 changes: 2 additions & 2 deletions PIL/JpegImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def load_djpeg(self):
finally:
try:
os.unlink(path)
except:
except OSError:
pass

self.mode = self.im.mode
Expand Down Expand Up @@ -699,7 +699,7 @@ def _save_cjpeg(im, fp, filename):
subprocess.check_call(["cjpeg", "-outfile", filename, tempfile])
try:
os.unlink(tempfile)
except:
except OSError:
pass


Expand Down

0 comments on commit e9a6a96

Please sign in to comment.