Do not use bare except

This commit is contained in:
Andrew Murray 2018-06-11 16:00:57 +10:00
parent aeab86c005
commit dcf6bc047b
2 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ class LibTiffTestCase(PillowTestCase):
try:
self.assertEqual(im._compression, 'group4')
except:
except AttributeError:
print("No _compression")
print(dir(im))
@ -194,7 +194,7 @@ class TestFileLibTiff(LibTiffTestCase):
for tag in im.tag_v2:
try:
del(core_items[tag])
except:
except KeyError:
pass
# Type codes:

View File

@ -29,7 +29,7 @@ class TestLocale(PillowTestCase):
Image.open(path)
try:
locale.setlocale(locale.LC_ALL, "polish")
except:
except locale.Error:
unittest.skip('Polish locale not available')
Image.open(path)