~osomon/pyexiv2/pyexiv2-0.3

« back to all changes in this revision

Viewing changes to src/pyexiv2/utils.py

  • Committer: Olivier Tilloy
  • Date: 2012-03-15 09:31:06 UTC
  • mfrom: (373.1.1 empty-undefined-value)
  • Revision ID: olivier@tilloy.net-20120315093106-zg28lb2wa19odvcp
Fix undefined_to_string to accept empty strings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
# ******************************************************************************
4
4
#
5
 
# Copyright (C) 2006-2011 Olivier Tilloy <olivier@tilloy.net>
 
5
# Copyright (C) 2006-2012 Olivier Tilloy <olivier@tilloy.net>
6
6
#
7
7
# This file is part of the pyexiv2 distribution.
8
8
#
148
148
    :return: the corresponding decoded string
149
149
    :rtype: string
150
150
    """
 
151
    if undefined == '':
 
152
        return ''
151
153
    return ''.join(map(lambda x: chr(int(x)), undefined.rstrip().split(' ')))
152
154
 
153
155