diff options
author | Papoteur <papoteur@mageialinux-online.org> | 2017-05-14 08:53:06 +0200 |
---|---|---|
committer | Papoteur <papoteur@mageialinux-online.org> | 2017-05-14 08:53:06 +0200 |
commit | edb212df73e8970cc3682ddeabc9275381a7dffa (patch) | |
tree | ff7c152c1d5446c2ff996002bed6100ea0ff3d02 /src | |
parent | 5333a0f09de2ca71fb8a885905dc57631d090f1b (diff) | |
download | msec-edb212df73e8970cc3682ddeabc9275381a7dffa.tar msec-edb212df73e8970cc3682ddeabc9275381a7dffa.tar.gz msec-edb212df73e8970cc3682ddeabc9275381a7dffa.tar.bz2 msec-edb212df73e8970cc3682ddeabc9275381a7dffa.tar.xz msec-edb212df73e8970cc3682ddeabc9275381a7dffa.zip |
close properly file handler when saving
Diffstat (limited to 'src')
-rwxr-xr-x | src/msec/config.py | 3 |
1 files changed, 3 insertions, 0 deletions
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 # }}} |