google-code-export / labyrinth

Automatically exported from code.google.com/p/labyrinth
GNU General Public License v2.0
2 stars 0 forks source link

Use reflexion to determine if an oject has an attribute #133

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In src/labyrinth.py, you can read:

if not os.name == 'nt':
    locale.bindtextdomain('labyrinth', localedir)

This will fail non-linux non-windows plateforms since os.name will not be
'nt' and locale will not have any bindtextdomain method.

Reflexion can help:

if hasattr(locale, 'bindtextdomain'):
    locale.bindtextdomain('labyrinth', localedir)

Downstream patch from FreeBSD:
http://www.freebsd.org/cgi/cvsweb.cgi/ports/deskutils/labyrinth/files/patch-src_
labyrinth.py?rev=1.1;content-type=text%2Fplain

Original issue reported on code.google.com by romain.t...@gmail.com on 21 Dec 2008 at 12:03

GoogleCodeExporter commented 9 years ago

Original comment by sinfr...@gmail.com on 26 Feb 2009 at 9:43

GoogleCodeExporter commented 9 years ago
Patch applied.

Original comment by matthias...@gmail.com on 27 Feb 2009 at 5:47