Skip to content

Commit 78cf4ca

Browse files
City-buszchimosky
authored andcommitted
Replace deprecated ConfigParser readfp with read_file
ConfigParser's readfp() has been deprecated since Python 3.2 and removed in Python 3.12.
1 parent 75b924c commit 78cf4ca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/sugar3/bundle/contentbundle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def __init__(self, path):
6868

6969
def _parse_info(self, info_file):
7070
cp = ConfigParser()
71-
cp.readfp(info_file)
71+
cp.read_file(info_file)
7272

7373
section = 'Library'
7474

src/sugar3/graphics/icon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def _get_attach_points(self, info, size_request):
214214
try:
215215
with open(icon_filename) as config_file:
216216
cp = ConfigParser()
217-
cp.readfp(config_file)
217+
cp.read_file(config_file)
218218
attach_points_str = cp.get('Icon Data', 'AttachPoints')
219219
attach_points = attach_points_str.split(',')
220220
attach_x = float(attach_points[0].strip()) / 1000

0 commit comments

Comments
 (0)