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:
Sheidan 2025-07-20 22:21:07 +02:00 committed by GitHub
commit bc32bd4ce1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -437,7 +437,7 @@ class DconfPreference(object):
try:
with open(path, 'r') as fd:
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)
# Parse configuratoin file