!55 Fix bad call of cups connection getFile
From: @liyy9 Reviewed-by: @Charlie_li Signed-off-by: @Charlie_li
This commit is contained in:
commit
dd9b0ff73a
30
0007-Fix-bad-call-of-cups-connection-getFile.patch
Normal file
30
0007-Fix-bad-call-of-cups-connection-getFile.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From eb13a5061d176b813345867942ccaf8f5cf3d6c6 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Korbar <tkorbar@redhat.com>
|
||||
Date: Mon, 19 Nov 2018 13:43:39 +0100
|
||||
Subject: [PATCH] Fix bad call of cups connection getFile
|
||||
|
||||
---
|
||||
troubleshoot/ErrorLogFetch.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/troubleshoot/ErrorLogFetch.py b/troubleshoot/ErrorLogFetch.py
|
||||
index d7807899..3840dbc8 100644
|
||||
--- a/troubleshoot/ErrorLogFetch.py
|
||||
+++ b/troubleshoot/ErrorLogFetch.py
|
||||
@@ -69,11 +69,11 @@ class ErrorLogFetch(Question):
|
||||
with NamedTemporaryFile (delete=False) as tmpf:
|
||||
success = False
|
||||
try:
|
||||
- c.getFile ('/admin/log/error_log', tmpf.file)
|
||||
+ c.getFile ('/admin/log/error_log', file = tmpf)
|
||||
success = True
|
||||
except cups.HTTPError:
|
||||
try:
|
||||
- os.remove (tmpf.file)
|
||||
+ os.remove (tmpf.name)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
Name: system-config-printer
|
||||
Summary: a graphical tool for CUPS administration
|
||||
Version: 1.5.11
|
||||
Release: 20
|
||||
Release: 21
|
||||
License: GPLv2+
|
||||
URL: https://github.com/zdohnal/system-config-printer
|
||||
Source0: https://github.com/zdohnal/system-config-printer/archive/%{version}.tar.gz
|
||||
@ -14,6 +14,7 @@ Patch0003: 0003-Set-programe-name-for-scp-dbus-service-as-well.patch
|
||||
Patch0004: 0004-Fix-typo-in-debugprint-call.patch
|
||||
Patch0005: 0005-Fix-TypeError-raised-by-debugprint-call.patch
|
||||
Patch0006: 0006-Fix-bad-use-of-NamedTemporaryFile.patch
|
||||
Patch0007: 0007-Fix-bad-call-of-cups-connection-getFile.patch
|
||||
|
||||
BuildRequires: libusb1-devel gcc gettext-devel systemd xmlto systemd-devel python3-devel
|
||||
BuildRequires: intltool cups-devel >= 1.2 desktop-file-utils >= 0.2.92 pkgconfig(glib-2.0)
|
||||
@ -89,6 +90,9 @@ rm -rf /var/cache/foomatic/foomatic.pickle
|
||||
exit 0
|
||||
|
||||
%changelog
|
||||
* Fri Nov 24 2023 liyuanyuan <liyuanyuan@xfusion.com> - 1.5.11-21
|
||||
- Fix bad call of cups connection getFile
|
||||
|
||||
* Thu Nov 09 2023 liyuanyuan <liyuanyuan@xfusion.com> - 1.5.11-20
|
||||
- Fix bad use of NamedTemporaryFile
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user