mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
From eb5e88152538a36e74ea8d7085a54baf48e06103 Mon Sep 17 00:00:00 2001
|
|
From: Zdenek Dohnal <zdohnal@redhat.com>
|
|
Date: Jul 17 2023 16:43:31 +0000
|
|
Subject: 2221311 - [python3.12] hplip tools/binaries crash due depending on removed configparser.readfp()
|
|
|
|
|
|
---
|
|
|
|
diff --git a/base/g.py b/base/g.py
|
|
index 0aa0e2e..96b3131 100644
|
|
--- a/base/g.py
|
|
+++ b/base/g.py
|
|
@@ -128,7 +128,7 @@ class ConfigBase(object):
|
|
try:
|
|
fp = open(self.filename, "r")
|
|
try:
|
|
- self.conf.readfp(fp)
|
|
+ self.conf.read_file(fp, self.filename)
|
|
except configparser.MissingSectionHeaderError:
|
|
print("")
|
|
log.error("Found No Section in %s. Please set the http proxy for root and try again." % self.filename)
|
|
diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py
|
|
index 3110a0f..3761f89 100644
|
|
--- a/ui5/devmgr5.py
|
|
+++ b/ui5/devmgr5.py
|
|
@@ -1072,7 +1072,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow):
|
|
|
|
hplip_conf = configparser.ConfigParser()
|
|
fp = open("/etc/hp/hplip.conf", "r")
|
|
- hplip_conf.readfp(fp)
|
|
+ hplip_conf.read_file(fp, "/etc/hp/hplip.conf")
|
|
fp.close()
|
|
|
|
try:
|
|
try:
|