aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2009-02-06 19:29:38 +0100
committerOlivier Tilloy <olivier@tilloy.net>2009-02-06 19:29:38 +0100
commit642e3d6734d214699cc6ced43bfc3446d0360f85 (patch)
tree730f9fa1820e7639fe9d1ffbef86003e20095de3
parent85c259a4c2d842b2501d1a2af586f230805c6ddd (diff)
downloadpyexiv2-642e3d6734d214699cc6ced43bfc3446d0360f85.tar.gz
Removed the value attribute of the base metadata class.
-rw-r--r--src/pyexiv2.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/pyexiv2.py b/src/pyexiv2.py
index 3097a2b..a00e4db 100644
--- a/src/pyexiv2.py
+++ b/src/pyexiv2.py
@@ -363,7 +363,6 @@ class MetadataTag(object):
self.description = description
self.xtype = xtype
self._value = value
- self.value = value
def __str__(self):
"""
@@ -492,8 +491,8 @@ class XmpTag(MetadataTag):
"""
Constructor.
"""
- MetadataTag.__init__(self, key, name, label, description, xtype, values)
- self.value = map(lambda x: XmpTag._convert_to_python(x, self.xtype), self.value)
+ super(XmpTag, self).__init__(key, name, label, description, xtype, values)
+ self.values = map(lambda x: XmpTag._convert_to_python(x, self.xtype), self._value)
@staticmethod
def _convert_to_python(value, xtype):
@@ -756,8 +755,13 @@ class XmpTag(MetadataTag):
"""
Return a string representation of the XMP tag.
"""
- r = MetadataTag.__str__(self)
- return r.replace('Raw value = ', 'Raw values = ')
+ r = 'Key = ' + self.key + os.linesep + \
+ 'Name = ' + self.name + os.linesep + \
+ 'Label = ' + self.label + os.linesep + \
+ 'Description = ' + self.description + os.linesep + \
+ 'Type = ' + self.xtype + os.linesep + \
+ 'Values = ' + str(self.values)
+ return r
class Image(libexiv2python.Image):