From c6037b035574c02870e9a895d0cd76c9ffb327e0 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Thu, 30 Aug 2012 23:07:51 -0500 Subject: [PATCH] windows and osx cannot find the rules folder, for now, ignore it --- VERSION | 2 +- gluon/languages.py | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/VERSION b/VERSION index d250e172..24b002fd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.0.3 (2012-08-30 22:36:07) stable +Version 2.0.3 (2012-08-30 23:07:46) stable diff --git a/gluon/languages.py b/gluon/languages.py index d8ef8735..818ac90d 100644 --- a/gluon/languages.py +++ b/gluon/languages.py @@ -249,13 +249,14 @@ def read_possible_plurals(): pdir = pjoin(pdirname(__file__),'contrib','rules') plurals = {} # scan rules directory for plural_rules-*.py files: - for pname in os.listdir(pdir): - if not isdir(pname) and regex_plural_rules.match(pname): - lang = pname[13:-3] - fname = ospath.join(pdir, pname) - n, f1, f2, status = read_global_plural_rules(fname) - if status == 'ok': - plurals[lang] = (lang, n, f1, f2, pname) + if os.path.exists(pdir): + for pname in os.listdir(pdir): + if not isdir(pname) and regex_plural_rules.match(pname): + lang = pname[13:-3] + fname = ospath.join(pdir, pname) + n, f1, f2, status = read_global_plural_rules(fname) + if status == 'ok': + plurals[lang] = (lang, n, f1, f2, pname) plurals['default'] = ('default', DEFAULT_NPLURALS, DEFAULT_GET_PLURAL_ID,