Skip to content

Commit

Permalink
migrate deprecated readfp call
Browse files Browse the repository at this point in the history
io.StringIO can be used with read_file instead
  • Loading branch information
hypnotoad authored and ski7777 committed Jan 14, 2023
1 parent 96b3873 commit 0d2c121
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def install_zip(self,f):
# is used as the apps local directory
manifest_str = io.StringIO(z.read("manifest").decode('utf-8'))
manifest = configparser.RawConfigParser()
manifest.readfp(manifest_str)
manifest.read_file(manifest_str)
if not manifest.has_option('app', 'uuid'):
return((False, QCoreApplication.translate("Error", "Manifest does not contain a UUID!")))

Expand Down Expand Up @@ -572,7 +572,7 @@ def onNetworkResult(self, result):
# parse result
packages_str = io.StringIO(result[1].decode('utf-8'))
packages = configparser.RawConfigParser()
packages.readfp(packages_str)
packages.read_file(packages_str)
apps = packages.sections()
applist = []
for app in apps:
Expand Down

0 comments on commit 0d2c121

Please sign in to comment.