cli: Ignore broken pipe errors
BUG:FIXED:13609
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
#
|
#
|
||||||
# Copyright (C) 2005 - 2007, TUBITAK/UEKAE
|
# Copyright (C) 2005 - 2010, TUBITAK/UEKAE
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify it under
|
# This program is free software; you can redistribute it and/or modify it under
|
||||||
# the terms of the GNU General Public License as published by the Free
|
# the terms of the GNU General Public License as published by the Free
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import errno
|
||||||
import locale
|
import locale
|
||||||
import traceback
|
import traceback
|
||||||
import exceptions
|
import exceptions
|
||||||
@@ -47,6 +48,9 @@ def handle_exception(exception, value, tb):
|
|||||||
show_traceback = True
|
show_traceback = True
|
||||||
ui.error(_("Unhandled internal exception.\n"
|
ui.error(_("Unhandled internal exception.\n"
|
||||||
"Please file a bug report to <http://bugs.pardus.org.tr>."))
|
"Please file a bug report to <http://bugs.pardus.org.tr>."))
|
||||||
|
elif isinstance(value, IOError) and value.errno == errno.EPIPE:
|
||||||
|
# Ignore broken pipe errors
|
||||||
|
sys.exit(0)
|
||||||
else:
|
else:
|
||||||
# For any other exception (possibly Python exceptions) show
|
# For any other exception (possibly Python exceptions) show
|
||||||
# the traceback!
|
# the traceback!
|
||||||
|
|||||||
Reference in New Issue
Block a user