]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
CLI: tolerate blank lines in the aliases file
authorBrian Warner <warner@allmydata.com>
Wed, 13 Aug 2008 02:50:50 +0000 (19:50 -0700)
committerBrian Warner <warner@allmydata.com>
Wed, 13 Aug 2008 02:50:50 +0000 (19:50 -0700)
src/allmydata/scripts/common.py

index 54b195cd899544fbc36ef324f150eb092d0d5a5a..a6d0a1099fdec7f37779f221802c4cdb3e45254c 100644 (file)
@@ -86,7 +86,7 @@ def get_aliases(nodedir):
         f = open(aliasfile, "r")
         for line in f.readlines():
             line = line.strip()
-            if line.startswith("#"):
+            if line.startswith("#") or not line:
                 continue
             name, cap = line.split(":", 1)
             # normalize it: remove http: prefix, urldecode