'clearsilver' dependencies

This commit is contained in:
age 2006-10-31 15:07:13 +00:00
parent 9990c5ec9f
commit 662be231b9
2 changed files with 8 additions and 2 deletions

View file

@ -66,7 +66,10 @@ class CryptoBoxPlugin:
def getLanguageData(self, lang="en"): def getLanguageData(self, lang="en"):
try:
import neo_cgi, neo_util import neo_cgi, neo_util
except:
raise CryptoBoxExceptions.CBEnvironmentError("couldn't import 'neo_*'! Try 'apt-get install python-clearsilver'.")
langdir = os.path.abspath(os.path.join(self.pluginDir, "lang")) langdir = os.path.abspath(os.path.join(self.pluginDir, "lang"))
## first: the default language file (english) ## first: the default language file (english)
langFiles = [os.path.join(langdir, "en.hdf")] langFiles = [os.path.join(langdir, "en.hdf")]

View file

@ -79,7 +79,10 @@ class WebInterfaceDataset(dict):
def __getLanguageName(self, lang): def __getLanguageName(self, lang):
try:
import neo_cgi, neo_util, neo_cs import neo_cgi, neo_util, neo_cs
except:
raise CryptoBoxExceptions.CBEnvironmentError("couldn't import 'neo_*'! Try 'apt-get install python-clearsilver'.")
hdf_path = os.path.join(self.prefs["Locations"]["LangDir"], lang + ".hdf") hdf_path = os.path.join(self.prefs["Locations"]["LangDir"], lang + ".hdf")
hdf = neo_util.HDF() hdf = neo_util.HDF()
hdf.readFile(hdf_path) hdf.readFile(hdf_path)