mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-02 04:04:23 -07:00
Update: handling IO operation errors
This update allows: * Compatibility between python2 and python3 * To handle IO operation errors Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
d86098674b
commit
bc32bd4ce1
1 changed files with 1 additions and 1 deletions
|
@ -437,7 +437,7 @@ class DconfPreference(object):
|
||||||
try:
|
try:
|
||||||
with open(path, 'r') as fd:
|
with open(path, 'r') as fd:
|
||||||
raw_config = fd.read()
|
raw_config = fd.read()
|
||||||
except FileNotFoundError as ex:
|
except IOError as ex:
|
||||||
self.module.fail_json(msg='dconf failed while reading configuration file with error: %s' % ex)
|
self.module.fail_json(msg='dconf failed while reading configuration file with error: %s' % ex)
|
||||||
|
|
||||||
# Parse configuratoin file
|
# Parse configuratoin file
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue