Comment 3 for bug 363873

Revision history for this message
Andrea Ambu (andreambu) wrote :

Hi Olivier,

does it require any particular effort to fix this for series 0.1.x too?
Ubuntu is actually shipping 0.1.3-3build1 and an updated of the current shipped library would be very nice to see.
I tried to play a little with and come up deleting two lines. On the bottom there is the diff, it doesn't seem to break the unittest, anyway that test must be there for a reason, what would not work in this way?

Andrea

=== modified file 'src/pyexiv2.py'
--- src/pyexiv2.py 2009-03-14 21:43:49 +0000
+++ src/pyexiv2.py 2010-02-15 18:32:50 +0000
@@ -654,8 +654,6 @@
      except KeyError:
       pass
    if len(newValues) > 0:
- if len(newValues) == 1:
- newValues = newValues[0]
     self.__iptcTagsDict[key] = tuple([ConvertToPythonType(tagFamily, typeName, str(v)) for v in newValues])
    else:
     if self.__iptcTagsDict.has_key(key):