From 62788c4329958d7414d1ff618b8b48ef7ca225a5 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 17 Apr 2015 16:11:46 +0200 Subject: standardskriver tool: Tolerate non-existing [sections] in standardskriver.cfg. --- bin/standardskriver | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'bin') diff --git a/bin/standardskriver b/bin/standardskriver index 33d12e0..60f9f59 100755 --- a/bin/standardskriver +++ b/bin/standardskriver @@ -60,7 +60,7 @@ import re from socket import gethostname, getfqdn import netaddr from optparse import OptionParser -from ConfigParser import RawConfigParser +import ConfigParser # check whose customer system we are on... customer_id = None @@ -84,7 +84,7 @@ if not os.path.exists(CFG_FILE): print CFG_FILE_EXAMPLE sys.exit(1) -cfg = RawConfigParser() +cfg = ConfigParser.RawConfigParser() # hack: mac addrs contain :, which clashes with cfg syntax cfg.OPTCRE = re.compile( r'(?P