diff --git a/src/sugar3/bundle/activitybundle.py b/src/sugar3/bundle/activitybundle.py index 87aa79c71..f7b7d3e57 100644 --- a/src/sugar3/bundle/activitybundle.py +++ b/src/sugar3/bundle/activitybundle.py @@ -133,7 +133,7 @@ def _parse_info(self, info_file): if six.PY2: cp.readfp(info_file) else: - cp.read_string(info_file.read().decode()) + cp.read_file(info_file) section = 'Activity' @@ -258,7 +258,7 @@ def _parse_linfo(self, linfo_file): if six.PY2: cp.readfp(linfo_file) else: - cp.read_string(linfo_file.read().decode()) + cp.read_file(linfo_file) except ParsingError as e: logging.exception('Exception reading linfo file: %s', e) return diff --git a/src/sugar3/bundle/contentbundle.py b/src/sugar3/bundle/contentbundle.py index 0e61ade08..6cd8eedb0 100644 --- a/src/sugar3/bundle/contentbundle.py +++ b/src/sugar3/bundle/contentbundle.py @@ -68,7 +68,7 @@ def __init__(self, path): def _parse_info(self, info_file): cp = ConfigParser() - cp.readfp(info_file) + cp.read_file(info_file) section = 'Library' diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py index 342e802ab..03271bc5c 100644 --- a/src/sugar3/graphics/icon.py +++ b/src/sugar3/graphics/icon.py @@ -214,7 +214,7 @@ def _get_attach_points(self, info, size_request): try: with open(icon_filename) as config_file: cp = ConfigParser() - cp.readfp(config_file) + cp.read_file(config_file) attach_points_str = cp.get('Icon Data', 'AttachPoints') attach_points = attach_points_str.split(',') attach_x = float(attach_points[0].strip()) / 1000