~ubuntu-branches/ubuntu/precise/python-imaging/precise-updates

« back to all changes in this revision

Viewing changes to PIL/IptcImagePlugin.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-11-20 19:22:59 UTC
  • mfrom: (2.1.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091120192259-cmnfui5tv2jtq4xu
Tags: 1.1.7-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
2
2
# The Python Imaging Library.
3
 
# $Id: IptcImagePlugin.py 2813 2006-10-07 10:11:35Z fredrik $
 
3
# $Id$
4
4
#
5
5
# IPTC/NAA file handling
6
6
#
116
116
            if not tag or tag == (8,10):
117
117
                break
118
118
            if size:
119
 
                self.info[tag] = self.fp.read(size)
120
 
            else:
121
 
                self.info[tag] = None
 
119
                tagdata = self.fp.read(size)
 
120
            else:
 
121
                tagdata = None
 
122
            if tag in self.info.keys():
 
123
                if isinstance(self.info[tag], list):
 
124
                    self.info[tag].append(tagdata)
 
125
                else:
 
126
                    self.info[tag] = [self.info[tag], tagdata]
 
127
            else:
 
128
                self.info[tag] = tagdata
 
129
 
122
130
            # print tag, self.info[tag]
123
131
 
124
132
        # mode