From edb212df73e8970cc3682ddeabc9275381a7dffa Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sun, 14 May 2017 08:53:06 +0200 Subject: close properly file handler when saving --- src/msec/config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/msec/config.py b/src/msec/config.py index 906f434..ff08b88 100755 --- a/src/msec/config.py +++ b/src/msec/config.py @@ -299,6 +299,7 @@ class MsecConfig: else: value = '"%s"' % value print("%s=%s" % (option, value), file=fd) + fd.close() return True # }}} @@ -392,6 +393,7 @@ class ExceptionConfig: self.log.debug("Skipping %s" % option) else: print("%s %s" % (option, value), file=fd) + fd.close() return True # }}} @@ -498,5 +500,6 @@ class PermConfig(MsecConfig): else: force = "" print("%s\t%s.%s\t%s%s\t%s" % (file, user, group, perm, force, acl), file=fd) + fd.close() return True # }}} -- cgit v1.2.1