Fix indention
This commit is contained in:
@@ -408,7 +408,7 @@ class CardGenerator(object):
|
|||||||
|
|
||||||
if self.mf == None or self.sam == None:
|
if self.mf == None or self.sam == None:
|
||||||
raise ValueError("Card Generator wasn't set up properly" +\
|
raise ValueError("Card Generator wasn't set up properly" +\
|
||||||
"(missing MF or SAM).")
|
"(missing MF or SAM).")
|
||||||
|
|
||||||
mf_string = dumps(self.mf)
|
mf_string = dumps(self.mf)
|
||||||
sam_string = dumps(self.sam)
|
sam_string = dumps(self.sam)
|
||||||
@@ -427,14 +427,14 @@ class CardGenerator(object):
|
|||||||
def readDatagroups(self, datasetfile):
|
def readDatagroups(self, datasetfile):
|
||||||
"""Read Datagroups from file"""
|
"""Read Datagroups from file"""
|
||||||
with open(datasetfile, 'r') as f:
|
with open(datasetfile, 'r') as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
if (not line.startswith("#")) and (not len(line.strip()) == 0):
|
if (not line.startswith("#")) and (not len(line.strip()) == 0):
|
||||||
# spaces after equal sign are allowed to get strings with leading spaces!
|
# spaces after equal sign are allowed to get strings with leading spaces!
|
||||||
line=line.replace(" =", "=")
|
line=line.replace(" =", "=")
|
||||||
splitLine = line.split("=")
|
splitLine = line.split("=")
|
||||||
# we don't want to have the newline char from dataset file as part of the value!!
|
# we don't want to have the newline char from dataset file as part of the value!!
|
||||||
self.datagroups[splitLine[0]] = splitLine[1].rstrip("\n\r")
|
self.datagroups[splitLine[0]] = splitLine[1].rstrip("\n\r")
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
|||||||
Reference in New Issue
Block a user