Make gettext optional; if it fails to load, define our own _() method that just returns the string.

This commit is contained in:
Thomas Hurst 2008-04-09 08:11:51 +01:00
parent e901e72730
commit 39bcfa8d32
1 changed files with 6 additions and 2 deletions

View File

@ -25,8 +25,12 @@ APP_VERSION = '0.9'
import os, platform, sys, string, time, math
from optparse import OptionParser
try:
import gettext
gettext.install (APP_NAME)
except:
def _ (text):
return text
# import unix-lib
import pwd