From bc32bd4ce120c862e0cbe33ba91203d981288299 Mon Sep 17 00:00:00 2001 From: Sheidan <37596668+Sh3idan@users.noreply.github.com> Date: Sun, 20 Jul 2025 22:21:07 +0200 Subject: [PATCH] Update: handling IO operation errors This update allows: * Compatibility between python2 and python3 * To handle IO operation errors Co-authored-by: Felix Fontein --- plugins/modules/dconf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/dconf.py b/plugins/modules/dconf.py index b6fb2c7c80..08860a1ace 100644 --- a/plugins/modules/dconf.py +++ b/plugins/modules/dconf.py @@ -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