windows and osx cannot find the rules folder, for now, ignore it

This commit is contained in:
mdipierro
2012-08-30 23:07:51 -05:00
parent 5edde2638e
commit c6037b0355
2 changed files with 9 additions and 8 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.0.3 (2012-08-30 22:36:07) stable
Version 2.0.3 (2012-08-30 23:07:46) stable
+8 -7
View File
@@ -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,