From d90914edb079be393aba87ad432d390beafb0b2d Mon Sep 17 00:00:00 2001 From: Dominik Date: Tue, 23 Dec 2014 12:10:07 +0100 Subject: [PATCH] Fix incorrect indention of close statement Commit 8ea1c74e2f0f707bf8f80947dab5a23495f9607a 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(). --- virtualsmartcard/src/vpicc/virtualsmartcard/CardGenerator.py | 1 - 1 file changed, 1 deletion(-) diff --git a/virtualsmartcard/src/vpicc/virtualsmartcard/CardGenerator.py b/virtualsmartcard/src/vpicc/virtualsmartcard/CardGenerator.py index 0987314..e7a4eba 100644 --- a/virtualsmartcard/src/vpicc/virtualsmartcard/CardGenerator.py +++ b/virtualsmartcard/src/vpicc/virtualsmartcard/CardGenerator.py @@ -434,7 +434,6 @@ class CardGenerator(object): splitLine = line.split("=") # 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") - f.close() if __name__ == "__main__": from optparse import OptionParser