summaryrefslogtreecommitdiffstats
path: root/ipalib/cli.py
diff options
context:
space:
mode:
authorGabe <redhatrises@gmail.com>2015-05-22 09:25:08 -0600
committerJan Cholasta <jcholast@redhat.com>2015-06-02 13:56:19 +0000
commitb98077ea6844eddd8810e4ae6ddd5bf40c61b58e (patch)
treefc4b58eca5eef523c5189a24310566d5eb9469ad /ipalib/cli.py
parent387be8651c3f407005469681ff05d3874abd6662 (diff)
downloadfreeipa-b98077ea6844eddd8810e4ae6ddd5bf40c61b58e.tar.gz
freeipa-b98077ea6844eddd8810e4ae6ddd5bf40c61b58e.tar.xz
freeipa-b98077ea6844eddd8810e4ae6ddd5bf40c61b58e.zip
Do not print traceback when pipe is broken
https://fedorahosted.org/freeipa/ticket/2284 Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipalib/cli.py')
-rw-r--r--ipalib/cli.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py
index 398b54863..52529ea02 100644
--- a/ipalib/cli.py
+++ b/ipalib/cli.py
@@ -799,7 +799,10 @@ class help(frontend.Local):
def _writer(self, outfile):
def writer(string=''):
- print >> outfile, unicode(string)
+ try:
+ print >> outfile, unicode(string)
+ except IOError:
+ pass
return writer
def print_topics(self, outfile):