File hplip-base-avoid-error-message-for-readfp.patch of Package hplip

--- a/base/g.py	2025-10-31 15:32:09.724271195 +0100
+++ b/base/g.py	2025-10-31 15:37:24.485724179 +0100
@@ -128,14 +128,14 @@
             try:
                 fp = open(self.filename, "r")
                 try:
-                    self.conf.readfp(fp)
+                    self.conf.read_file(fp)
                 except AttributeError as e:
-                    log.error(f"Error: {e}. Retrying with read_file")
+                    log.error(f"Error: {e}. Retrying with readfp")
                     try:
-                        # Attempting to use read_file as a fallback
-                        self.conf.read_file(fp)
+                        # Attempting to use deprecated readfp as a fallback
+                        self.conf.readfp(fp)
                     except Exception as e:
-                        log.error(f"Reading file with read_file also failed. Error: {e}")
+                        log.error(f"Reading file with readfp also failed. Error: {e}")
                 except configparser.MissingSectionHeaderError:
                     print("")
                     log.error("Found No Section in %s. Please set the http proxy for root and try again." % self.filename)
openSUSE Build Service is sponsored by