1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
From: Gabriele Mongiano <hom3rster@gmail.com>
Date: Fri, 8 Nov 2024 15:22:15 +0100
Subject: Fix settings file reading method in Settings.py
- Updated method from `readfp` to `read_file` for compatibility with Python 3.
- No change in functionality; improves code compliance with current Python standards.
(this is upstream PR 350)
---
afew/Settings.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/afew/Settings.py
+++ b/afew/Settings.py
@@ -18,7 +18,7 @@
# preserve the capitalization of the keys.
settings.optionxform = str
-settings.readfp(open(os.path.join(os.path.dirname(__file__), 'defaults', 'afew.config')))
+settings.read_file(open(os.path.join(os.path.dirname(__file__), 'defaults', 'afew.config')))
settings.read(os.path.join(user_config_dir, 'config'))
# All the values for keys listed here are interpreted as ;-delimited lists
|