Fix deprecated function readfp

Since Python 3.2 function readfp is replaced with read_file:
https://docs.python.org/3.12/library/configparser.html#configparser.ConfigParser.read_file
Readfp was fully removed in Python 3.12 so this fix is needed.
This commit is contained in:
Petr Čermák 2023-11-24 02:33:13 +01:00 committed by GitHub
parent 328312f342
commit 0b501808d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,7 +25,7 @@ home = os.getenv('HOME') or os.getenv('USERPROFILE') or ''
user_file = os.path.join(home,'.config','GPy', 'user.cfg')
# Read in the given files.
config.readfp(open(default_file))
config.read_file(open(default_file))
config.read([local_file, user_file])
if not config: