58 lines
2.5 KiB
Diff
58 lines
2.5 KiB
Diff
diff -ur hplip-3.23.8.orig/base/g.py hplip-3.23.8/base/g.py
|
|
--- hplip-3.23.8.orig/base/g.py 2023-10-15 16:09:06.390645895 -0400
|
|
+++ hplip-3.23.8/base/g.py 2023-10-15 16:10:55.225170318 -0400
|
|
@@ -128,7 +128,7 @@
|
|
try:
|
|
fp = open(self.filename, "r")
|
|
try:
|
|
- self.conf.readfp(fp)
|
|
+ self.conf.read_file(fp)
|
|
except configparser.MissingSectionHeaderError:
|
|
print("")
|
|
log.error("Found No Section in %s. Please set the http proxy for root and try again." % self.filename)
|
|
diff -ur hplip-3.23.8.orig/ui/devmgr4.py hplip-3.23.8/ui/devmgr4.py
|
|
--- hplip-3.23.8.orig/ui/devmgr4.py 2023-10-15 16:09:06.460646229 -0400
|
|
+++ hplip-3.23.8/ui/devmgr4.py 2023-10-15 16:10:31.857056822 -0400
|
|
@@ -1226,9 +1226,8 @@
|
|
opt_plugin = d.plugin == PLUGIN_OPTIONAL
|
|
|
|
hplip_conf = ConfigParser.ConfigParser()
|
|
- fp = open("/etc/hp/hplip.conf", "r")
|
|
- hplip_conf.readfp(fp)
|
|
- fp.close()
|
|
+ with open("/etc/hp/hplip.conf", "r") as fp:
|
|
+ hplip_conf.read_file(fp)
|
|
|
|
try:
|
|
plugin_installed = utils.to_bool(hplip_conf.get("hplip", "plugin"))
|
|
diff -ur hplip-3.23.8.orig/ui4/devmgr5.py hplip-3.23.8/ui4/devmgr5.py
|
|
--- hplip-3.23.8.orig/ui4/devmgr5.py 2023-10-15 16:09:06.475646300 -0400
|
|
+++ hplip-3.23.8/ui4/devmgr5.py 2023-10-15 16:10:13.125965849 -0400
|
|
@@ -1023,9 +1023,8 @@
|
|
return
|
|
|
|
hplip_conf = configparser.ConfigParser()
|
|
- fp = open("/etc/hp/hplip.conf", "r")
|
|
- hplip_conf.readfp(fp)
|
|
- fp.close()
|
|
+ with open("/etc/hp/hplip.conf", "r") as fp:
|
|
+ hplip_conf.read_file(fp)
|
|
|
|
try:
|
|
plugin_installed = utils.to_bool(hplip_conf.get("hplip", "plugin"))
|
|
diff -ur hplip-3.23.8.orig/ui5/devmgr5.py hplip-3.23.8/ui5/devmgr5.py
|
|
--- hplip-3.23.8.orig/ui5/devmgr5.py 2023-10-15 16:09:06.467646262 -0400
|
|
+++ hplip-3.23.8/ui5/devmgr5.py 2023-10-15 16:11:12.961256459 -0400
|
|
@@ -1073,9 +1073,8 @@
|
|
return
|
|
|
|
hplip_conf = configparser.ConfigParser()
|
|
- fp = open("/etc/hp/hplip.conf", "r")
|
|
- hplip_conf.readfp(fp)
|
|
- fp.close()
|
|
+ with open("/etc/hp/hplip.conf", "r") as fp:
|
|
+ hplip_conf.read_file(fp)
|
|
|
|
try:
|
|
plugin_installed = utils.to_bool(hplip_conf.get("hplip", "plugin"))
|