]> mj.ucw.cz Git - moe.git/commitdiff
Renamed VARNAME_re to re_VARNAME
authorTomas Gavenciak <gavento@matfyz.cz>
Sun, 23 May 2010 15:59:47 +0000 (11:59 -0400)
committerTomas Gavenciak <gavento@matfyz.cz>
Sun, 23 May 2010 15:59:47 +0000 (11:59 -0400)
t/moe/conf.py
t/moe/confparser.py

index 994214124aeb3a1add5afea3e229ec63f913a6bd..37219ccbcba5db4f10e4f15355d3169f6b47daea 100644 (file)
@@ -26,7 +26,7 @@ TODO: Test conditions and unicode
 
 import types, itertools, re
 import logging as log
-from confparser import VARNAME_re
+from confparser import re_VARNAME
 
 "Allowed depth of recursion - includes ALL recursive calls, so should quite high."
 c_maxdepth = 256
@@ -63,7 +63,7 @@ class ConfigTree(object):
     if not key in self.variables:
       if not create:
        raise ConfigError('Config variable %r undefined.', key)
-      if not VARNAME_re.match(key):
+      if not re_VARNAME.match(key):
        raise ConfigError('Invalid variable identifier %r in config', key)
       self.variables[key] = ConfigVar(key)
     return self.variables[key]
index 352ab7bfae414ccaa3ef89135f126d58a787fda2..58a7dad42907b159a924d299f30fdf948021960d 100644 (file)
@@ -47,5 +47,6 @@ c_close = u'}'
 c_if = u'if'
 
 "Variable name regexp, dots (separators) must be separated from edges and each other."
-VARNAME_re = re.compile(r'\A([A-Za-z0-9_-]+\.)*[A-Za-z0-9_-]+\Z')
+re_VARNAME = re.compile(r'\A([A-Za-z0-9_-]+\.)*[A-Za-z0-9_-]+\Z')
+