X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=t%2Fmoe%2Fstatus.py;h=144bf486f66afffaf6e272d79a74ebc7b727e43a;hb=3b2c0c783bf7284037f4c5c5ffd6582ee7b1f89c;hp=0cba45cb6eb029e3b100bd4dbdf7ae4adc03088c;hpb=a2b67db58687090326fd51af7db278c194692977;p=moe.git diff --git a/t/moe/status.py b/t/moe/status.py index 0cba45c..144bf48 100644 --- a/t/moe/status.py +++ b/t/moe/status.py @@ -2,14 +2,20 @@ import sys import types import re -key_pattern = re.compile("\A[A-Za-z0-9_-]+\Z") +key_pattern_str = "\A[A-Za-z0-9_-]+\Z" +key_pattern = re.compile(key_pattern_str) -class InvalidStatusFile(Exception): +class InvalidStatusFile(StandardError): pass -class Status: +class Status(object): """ - (One subtree of) Moe status file. + (One subtree of) a status file. + + Each Status is a dictionary with string keys matching the specs. and + values either strings or nested Status subtrees. + + The class defines `__getitem__`, `__setitem__`, `__eq__` and `keys`. """ def __init__(self):