Misleading exception raised when metadata not read

Bug #687373 reported by Olivier Tilloy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyexiv2
Fix Released
Medium
Olivier Tilloy

Bug Description

In the 0.1.x series, when trying to access the metadata of an image that had not been read() yet, an IOError with a relevant error message was raised.
The same behaviour is expected in the 0.2.x series, but instead an AttributeError with a misleading error message is raised.

Script to reproduce:

    import pyexiv2
    m = pyexiv2.ImageMetadata("test/data/smiley1.jpg")
    m.exif_keys

Expected result: IOError: Image metadata has not been read yet
Current result: AttributeError: 'NoneType' object has no attribute '_exifKeys'

Tags: regression
Olivier Tilloy (osomon)
Changed in pyexiv2:
status: Confirmed → In Progress
Revision history for this message
Olivier Tilloy (osomon) wrote :

Fixed with revision 337 of the trunk.

Changed in pyexiv2:
status: In Progress → Fix Committed
Olivier Tilloy (osomon)
Changed in pyexiv2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.