diff options
author | John (J5) Palmieri <johnp@redhat.com> | 2011-07-18 10:45:18 -0400 |
---|---|---|
committer | John (J5) Palmieri <johnp@redhat.com> | 2011-07-18 10:45:18 -0400 |
commit | 2937cfe5bb7122dd3783c7919294d6a34a3dfc05 (patch) | |
tree | 5b74be2f5a4b5ff1b32b9e81d6991db348dc695d /gi/module.py | |
parent | 519e556dc1e5874e1668bad93043fb9258c7ee79 (diff) | |
parent | 917ea2dfa2d097e563233145003a66b3e4423287 (diff) | |
download | pygobject-invoke-rewrite.tar.gz |
Merge branch 'master' into invoke-rewriteinvoke-rewrite
Diffstat (limited to 'gi/module.py')
-rw-r--r-- | gi/module.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gi/module.py b/gi/module.py index 70df76c7..d56bdafe 100644 --- a/gi/module.py +++ b/gi/module.py @@ -24,7 +24,11 @@ from __future__ import absolute_import import os import gobject -import string +try: + maketrans = ''.maketrans +except AttributeError: + # fallback for Python 2 + from string import maketrans import gi from .overrides import registry @@ -124,7 +128,7 @@ class IntrospectionModule(object): # Don't use upper() here to avoid locale specific # identifier conversion (e. g. in Turkish 'i'.upper() == 'i') # see https://bugzilla.gnome.org/show_bug.cgi?id=649165 - ascii_upper_trans = string.maketrans( + ascii_upper_trans = maketrans( 'abcdefgjhijklmnopqrstuvwxyz', 'ABCDEFGJHIJKLMNOPQRSTUVWXYZ') for value_info in info.get_values(): |