Simplify conf file read
authorJeremy Kerr <jk@ozlabs.org>
Sun, 19 Nov 2006 11:52:38 +0000 (22:52 +1100)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 12 Nov 2009 23:58:39 +0000 (10:58 +1100)
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
bitfield

index da2b94b7f294fe23c24a864da5f502e955b486ed..359e96d7cc8bd04b50688c6092fc4e06208d085d 100644 (file)
--- a/bitfield
+++ b/bitfield
@@ -112,7 +112,7 @@ class ConfigurationError(Exception):
 def parse_config(bnf, regs, file):
        f = open(file)
 
-       tokens = bnf.parseString("".join(f.readlines()))
+       tokens = bnf.parseString(f.read()))
 
        for tok in tokens:
                ts = tok.asList()