Commits

Fredrik Lundh  committed e9ec832 Merge

Merge in more-tests branch.

  • Participants
  • Parent commits 1396f9c, de08465
  • Branches more-tests

Comments (0)

Files changed (3)

File PIL/JpegImagePlugin.py

         for key, value in info.items():
             exif[key] = fixup(value)
         # get exif extension
-        file.seek(exif[0x8769])
-        info = TiffImagePlugin.ImageFileDirectory(head)
-        info.load(file)
-        for key, value in info.items():
-            exif[key] = fixup(value)
+        try:
+            file.seek(exif[0x8769])
+        except KeyError:
+            pass
+        else:
+            info = TiffImagePlugin.ImageFileDirectory(head)
+            info.load(file)
+            for key, value in info.items():
+                exif[key] = fixup(value)
         # get gpsinfo extension
         try:
             file.seek(exif[0x8825])

File Tests/test_001_archive.py

         print "-", "failed to open", file, "-", v
     else:
         print "+", file, im.mode, im.size, im.format
+        if e == ".exif":
+            try:
+                info = im._getexif()
+            except KeyError, v:
+                print "-", "failed to get exif info from", file, "-", v
 
 print "ok"

File Tests/test_contents.py

 
     for file in contents:
         root, file = file.split(os.sep, 1)
+        if file == "MANIFEST":
+            continue # generated by distribution scripts
         assert_true(os.path.isfile(file), "%r not found" % file)