hplip/hpfax-bug-function-used-before-importing-log.dpatch
2013-08-26 10:37:49 +04:00

23 lines
777 B
Text

#! /bin/sh /usr/share/dpatch/dpatch-run
## hpfax-bug-function-used-before-importing-log.dpatch by <till.kamppeter@gmail.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
Index: hplip-3.12.4/fax/backend/hpfax.py
===================================================================
--- hplip-3.12.4.orig/fax/backend/hpfax.py 2012-04-10 18:34:59.000000000 +1000
+++ hplip-3.12.4/fax/backend/hpfax.py 2012-05-26 10:21:30.000000000 +1000
@@ -52,7 +52,10 @@
def bug(msg):
syslog.syslog("hpfax[%d]: error: %s\n" % (pid, msg))
- log.stderr("ERROR: %s\n" % msg)
+ try:
+ log.stderr("ERROR: %s\n" % msg)
+ except:
+ print >> sys.stderr, ("ERROR: %s\n" % msg)
if os.path.exists(config_file):