system-config-printer/0007-Fix-bad-call-of-cups-connection-getFile.patch
2023-11-07 00:20:35 +08:00

31 lines
1.0 KiB
Diff

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