More informative error message when NUL file missing on windows

This commit is contained in:
Kovid Goyal 2010-10-11 15:40:40 -06:00
parent 6e6435913b
commit 471aac1bc7

View File

@ -14,7 +14,10 @@ from calibre.ptempfile import PersistentTemporaryFile, base_dir
if iswindows: if iswindows:
import win32process import win32process
try:
_windows_null_file = open(os.devnull, 'wb') _windows_null_file = open(os.devnull, 'wb')
except:
raise RuntimeError('NUL %r file missing in windows'%os.devnull)
class Worker(object): class Worker(object):
''' '''