allow comments in config file
This commit is contained in:
@@ -824,14 +824,21 @@ except:
|
||||
|
||||
if f:
|
||||
while 1:
|
||||
l = f.readline()
|
||||
if len(l) == 0:
|
||||
ls = f.readline()
|
||||
if len(ls) == 0:
|
||||
break
|
||||
l = ls[:-1].strip()
|
||||
if len(l) == 0 or l[0] == "#":
|
||||
continue
|
||||
if verbose:
|
||||
print " %s" % l[:-1]
|
||||
r = l[:-1].split('=')
|
||||
print " %s" % l
|
||||
r = l.split('=')
|
||||
o = r[0].strip()
|
||||
try:
|
||||
a = eval(r[1].strip())
|
||||
except Exception as e:
|
||||
print "error: %s" % str(r)
|
||||
sys.exit(1)
|
||||
if o == 'interval':
|
||||
interval = a
|
||||
elif o == 'grace':
|
||||
|
||||
Reference in New Issue
Block a user