import re
import sys
+import moe
key_pattern = re.compile("^[A-Za-z0-9_-]+$")
ref_pattern = re.compile("^[A-Za-z0-9_-]+")
-class MoeConfigInvalid(Exception):
+class MoeConfigInvalid(moe.MoeErr):
pass
-class MoeConfigEvalErr(Exception):
+class MoeConfigEvalErr(moe.MoeErr):
pass
class MoeConfig:
cfg = self.stk[pos]
if cfg.vars.has_key(k):
new = cfg.vars[k]
- if new[0][0] == "a":
+ if len(new) > 0 and new[0][0] == "a":
v = self.do_get(k, pos-1)
else:
v = ""