mirror of
https://github.com/samba-team/samba.git
synced 2025-03-10 12:58:35 +03:00
param: Fix resource leak
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
d497829bf1
commit
dd88d7a89f
@ -51,10 +51,10 @@ def iterate_all(path):
|
||||
"""
|
||||
|
||||
try:
|
||||
p = open(path, 'r')
|
||||
with open(path, 'r') as p:
|
||||
out = p.read()
|
||||
except IOError as e:
|
||||
raise Exception("Error opening parameters file")
|
||||
out = p.read()
|
||||
|
||||
# parse the parameters xml file
|
||||
root = ET.fromstring(out)
|
||||
|
Loading…
x
Reference in New Issue
Block a user