hplip/hplip-log-stderr.patch
Petr Šabata 3b7ae335f3 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/hplip#7cb6f648cdb35a0f018b511d10b516d6d9e4d638
2020-10-15 12:26:13 +02:00

38 lines
1.2 KiB
Diff

diff -up hplip-3.15.2/fax/backend/hpfax.py.log-stderr hplip-3.15.2/fax/backend/hpfax.py
--- hplip-3.15.2/fax/backend/hpfax.py.log-stderr 2015-01-29 13:20:35.000000000 +0100
+++ hplip-3.15.2/fax/backend/hpfax.py 2015-02-04 15:40:48.360972449 +0100
@@ -55,7 +55,10 @@ home_dir = ''
def bug(msg):
syslog.syslog("hpfax[%d]: error: %s\n" % (pid, msg))
- log.stderr("ERROR: %s\n" % msg)
+ try:
+ log.stderr("ERROR: %s" % msg)
+ except NameError:
+ sys.stderr.write("ERROR: %s\n" % msg)
if os.path.exists(config_file):
diff -up hplip-3.15.2/prnt/filters/hpps.log-stderr hplip-3.15.2/prnt/filters/hpps
--- hplip-3.15.2/prnt/filters/hpps.log-stderr 2015-02-04 15:40:48.360972449 +0100
+++ hplip-3.15.2/prnt/filters/hpps 2015-02-04 15:43:14.796878364 +0100
@@ -53,10 +53,16 @@ home_dir = ''
def bug(m):
- log.stderr("ERROR: %s" % m)
+ try:
+ log.stderr("ERROR: %s" % m)
+ except NameError:
+ sys.stderr.write("ERROR: %s\n" % m)
def msg(m):
- log.stderr("INFO: %s" % m)
+ try:
+ log.stderr("INFO: %s" % msg)
+ except NameError:
+ sys.stderr.write("INFO: %s\n" % msg)
if os.path.exists(config_file):
config = configparser.ConfigParser()