#! /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@ diff --git a/fax/backend/hpfax.py b/fax/backend/hpfax.py index 9560e84..7aaef35 100755 --- a/fax/backend/hpfax.py +++ b/fax/backend/hpfax.py @@ -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\n" % msg) + except: + print >> sys.stderr, ("ERROR: %s\n" % msg) if os.path.exists(config_file):