Browse files

updated readme to show how to use the Rules

  • Loading branch information...
1 parent 5f0eb50 commit 26a570c82602a43076e41af756ca4d69d8f2b146 @andreisavu committed Jul 16, 2010
Showing with 8 additions and 1 deletion.
  1. +8 −1 README
View
9 README
@@ -17,11 +17,18 @@ This class can be used in two ways:
* by importing it in your scripts
- from zoocfg import ZooCfg
+ from zoocfg import ZooCfg, Rules
cfg = ZooCfg.from_file('zoo.cfg')
cfg = ZooCfg(file_content)
+ check = Rules.check_all(cfg)
+ if check.has_errors():
+ # we've got errors in the configuration file
+
+ if check.has_warnings():
+ # some things are strange
+
* or by using the command-line tool
./zoocfg.py -f zoo.cfg -w

0 comments on commit 26a570c

Please sign in to comment.