mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Dont fail to launch worker process if cwd no longer exists
This commit is contained in:
parent
c5335f476e
commit
db67eb621b
@ -167,8 +167,14 @@ class Worker(object):
|
||||
'''
|
||||
exe = self.gui_executable if self.gui else self.executable
|
||||
env = self.env
|
||||
env[b'ORIGWD'] = binascii.hexlify(cPickle.dumps(cwd or
|
||||
os.path.abspath(os.getcwdu())))
|
||||
try:
|
||||
env[b'ORIGWD'] = binascii.hexlify(cPickle.dumps(
|
||||
cwd or os.path.abspath(os.getcwdu())))
|
||||
except EnvironmentError:
|
||||
# cwd no longer exists
|
||||
env[b'ORIGWD'] = binascii.hexlify(cPickle.dumps(
|
||||
cwd or os.path.expanduser(u'~')))
|
||||
|
||||
_cwd = cwd
|
||||
if priority is None:
|
||||
priority = prefs['worker_process_priority']
|
||||
|
Loading…
x
Reference in New Issue
Block a user