Skip to content

Commit 174a087

Browse files
committed
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 b6d4496 commit 174a087

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/sugar3/bundle/activitybundle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def __init__(self, path, translated=True):
129129

130130
def _parse_info(self, info_file):
131131
cp = ConfigParser()
132-
cp.readfp(info_file)
132+
cp.read_file(info_file)
133133

134134
section = 'Activity'
135135

@@ -238,7 +238,7 @@ def _get_linfo_file(self):
238238
def _parse_linfo(self, linfo_file):
239239
cp = ConfigParser()
240240
try:
241-
cp.readfp(linfo_file)
241+
cp.read_file(linfo_file)
242242

243243
section = 'Activity'
244244

src/sugar3/bundle/contentbundle.py

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

6868
def _parse_info(self, info_file):
6969
cp = ConfigParser()
70-
cp.readfp(info_file)
70+
cp.read_file(info_file)
7171

7272
section = 'Library'
7373

src/sugar3/graphics/icon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def _get_attach_points(self, info, size_request):
208208
try:
209209
with open(icon_filename) as config_file:
210210
cp = ConfigParser()
211-
cp.readfp(config_file)
211+
cp.read_file(config_file)
212212
attach_points_str = cp.get('Icon Data', 'AttachPoints')
213213
attach_points = attach_points_str.split(',')
214214
attach_x = float(attach_points[0].strip()) / 1000

0 commit comments

Comments
 (0)