1 Star 0 Fork 14

SaltyFruit/hplip

forked from src-openEuler/hplip 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
hplip-log-stderr.patch 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
jackie_wu123 提交于 2020-02-17 18:58 . package init
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()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/SaltyFruit/hplip.git
git@gitee.com:SaltyFruit/hplip.git
SaltyFruit
hplip
hplip
master

搜索帮助