From 54d765752778ef68b4f280557fbcf603d4e1a384 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 25 Feb 2014 22:57:42 +0530 Subject: [PATCH] ... --- src/calibre/utils/recycle_bin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/calibre/utils/recycle_bin.py b/src/calibre/utils/recycle_bin.py index f253de345a..0838ff4745 100644 --- a/src/calibre/utils/recycle_bin.py +++ b/src/calibre/utils/recycle_bin.py @@ -47,8 +47,11 @@ if iswindows: except: eintr_retry_call(print, b'KO', file=sys.stdout) sys.stdout.flush() - import traceback - traceback.print_exc() # goes to stderr, which is the same as for parent process + try: + import traceback + traceback.print_exc() # goes to stderr, which is the same as for parent process + except Exception: + pass # Ignore failures to write the traceback, since GUI processes on windows have no stderr else: eintr_retry_call(print, b'OK', file=sys.stdout) sys.stdout.flush()