Fix incorrect indention of close statement
Commit 8ea1c74e2f moved the f.close()
statement to the wrong indention level, thereby closing the file
prematurely when reading Datagroups from a file. Since files are closed
automatically due to the with statement, we just remove the explicit
call to close().
This commit is contained in:
@@ -434,7 +434,6 @@ class CardGenerator(object):
|
|||||||
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()
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
|||||||
Reference in New Issue
Block a user