Skip to content

Commit 1502ae5

Browse files
committed
Fail message to stderr
1 parent 1effe58 commit 1502ae5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/MeCab/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from . import _MeCab
1111

1212
import os
13+
import sys
1314
import shlex
1415

1516

@@ -100,7 +101,7 @@ def __init__(self, args=""):
100101
try:
101102
super(Tagger, self).__init__(args)
102103
except RuntimeError:
103-
print(FAILMESSAGE)
104+
sys.stderr.write(FAILMESSAGE)
104105
raise
105106

106107

@@ -117,7 +118,7 @@ def __init__(self, args=""):
117118
try:
118119
super(Model, self).__init__(args)
119120
except RuntimeError:
120-
print(FAILMESSAGE)
121+
sys.stderr.write(FAILMESSAGE)
121122
raise
122123

123124

0 commit comments

Comments
 (0)