Blame SOURCES/hplip-log-stderr.patch

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