hplip-log-stderr.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. diff -up hplip-3.15.2/fax/backend/hpfax.py.log-stderr hplip-3.15.2/fax/backend/hpfax.py
  2. --- hplip-3.15.2/fax/backend/hpfax.py.log-stderr 2015-01-29 13:20:35.000000000 +0100
  3. +++ hplip-3.15.2/fax/backend/hpfax.py 2015-02-04 15:40:48.360972449 +0100
  4. @@ -55,7 +55,10 @@ home_dir = ''
  5. def bug(msg):
  6. syslog.syslog("hpfax[%d]: error: %s\n" % (pid, msg))
  7. - log.stderr("ERROR: %s\n" % msg)
  8. + try:
  9. + log.stderr("ERROR: %s" % msg)
  10. + except NameError:
  11. + sys.stderr.write("ERROR: %s\n" % msg)
  12. if os.path.exists(config_file):
  13. diff -up hplip-3.15.2/prnt/filters/hpps.log-stderr hplip-3.15.2/prnt/filters/hpps
  14. --- hplip-3.15.2/prnt/filters/hpps.log-stderr 2015-02-04 15:40:48.360972449 +0100
  15. +++ hplip-3.15.2/prnt/filters/hpps 2015-02-04 15:43:14.796878364 +0100
  16. @@ -53,10 +53,16 @@ home_dir = ''
  17. def bug(m):
  18. - log.stderr("ERROR: %s" % m)
  19. + try:
  20. + log.stderr("ERROR: %s" % m)
  21. + except NameError:
  22. + sys.stderr.write("ERROR: %s\n" % m)
  23. def msg(m):
  24. - log.stderr("INFO: %s" % m)
  25. + try:
  26. + log.stderr("INFO: %s" % msg)
  27. + except NameError:
  28. + sys.stderr.write("INFO: %s\n" % msg)
  29. if os.path.exists(config_file):
  30. config = configparser.ConfigParser()