mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00
updated OSError to IOError
This commit is contained in:
parent
e40445dea7
commit
6d32f3cb94
1 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@ def read_config(filename):
|
|||
filepath = confdir + '/' + filename
|
||||
try:
|
||||
conf_file = open(filepath, 'r', 1)
|
||||
except OSError:
|
||||
except IOError:
|
||||
pass
|
||||
else:
|
||||
section = '' # The default section
|
||||
|
@ -48,7 +48,7 @@ def write_config(filename, config):
|
|||
filepath = confdir + '/' + filename
|
||||
try:
|
||||
conf_file = open(filepath, 'w')
|
||||
except OSError:
|
||||
except IOError:
|
||||
raise IOError("Unable to write to %s"%filename)
|
||||
else:
|
||||
for section in sorted(config.iterkeys()):
|
||||
|
|
Loading…
Add table
Reference in a new issue