Start packaging the bz2 python module as it is needed for building Qt5
[profile/ivi/python.git] / packaging / python-2.6-gettext-plurals.patch
1 Index: Lib/gettext.py
2 ===================================================================
3 --- Lib/gettext.py.orig
4 +++ Lib/gettext.py
5 @@ -311,8 +311,9 @@ class GNUTranslations(NullTranslations):
6                          self._charset = v.split('charset=')[1]
7                      elif k == 'plural-forms':
8                          v = v.split(';')
9 -                        plural = v[1].split('plural=')[1]
10 -                        self.plural = c2py(plural)
11 +                        if len(v) > 1:
12 +                            plural = v[1].split('plural=')[1]
13 +                            self.plural = c2py(plural)
14              # Note: we unconditionally convert both msgids and msgstrs to
15              # Unicode using the character encoding specified in the charset
16              # parameter of the Content-Type header.  The gettext documentation