From 471aac1bc7b5ef9be0cf5000d5c5d185a992ad41 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 11 Oct 2010 15:40:40 -0600 Subject: [PATCH] More informative error message when NUL file missing on windows --- src/calibre/utils/ipc/launch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/utils/ipc/launch.py b/src/calibre/utils/ipc/launch.py index 8d3628d69a..a179f356be 100644 --- a/src/calibre/utils/ipc/launch.py +++ b/src/calibre/utils/ipc/launch.py @@ -14,7 +14,10 @@ from calibre.ptempfile import PersistentTemporaryFile, base_dir if iswindows: import win32process - _windows_null_file = open(os.devnull, 'wb') + try: + _windows_null_file = open(os.devnull, 'wb') + except: + raise RuntimeError('NUL %r file missing in windows'%os.devnull) class Worker(object): '''