Fix config file parsing. Blank lines were messing thigns up.
authorFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Thu, 3 Apr 2008 22:15:41 +0000 (22:15 +0000)
committerFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Thu, 3 Apr 2008 22:15:41 +0000 (22:15 +0000)
codemux.py

index fa54d4e..1d907f7 100644 (file)
@@ -102,7 +102,9 @@ def parseConf(conf = CODEMUXCONF):
     try: 
         f = open(conf)
         for line in f.readlines():
-            if line.startswith("#") or (len(line.split()) > 4):
+            if line.startswith("#") \
+            or (len(line.split()) > 4) \
+            or (len(line.split()) < 3):
                 continue
             (host, slice, port) = line.split()[:3]
             logger.log("codemux:  found %s in conf" % slice, 2)