fix pipe of message to boobmsg (closes #455)

This commit is contained in:
Romain Bignon 2011-01-02 22:49:02 +01:00
commit 983883dc66

View file

@ -183,7 +183,9 @@ class Boobmsg(ReplApplication):
if text is None:
if self.interactive:
print 'Reading message content from stdin... Type ctrl-D from an empty line to post message.'
text = sys.stdin.read().decode(sys.stdin.encoding)
text = sys.stdin.read()
if sys.stdin.encoding:
text = text.decode(sys.stdin.encoding)
if self.options.skip_empty and not text.strip():
return