Fix #7276 (Viewer crash on main app close. (v0.7.24))

This commit is contained in:
Kovid Goyal 2010-10-24 14:57:43 -07:00
parent 4110646e8a
commit 138d503aba
2 changed files with 4 additions and 1 deletions

View File

@ -716,6 +716,9 @@ View an ebook.
def main(args=sys.argv): def main(args=sys.argv):
# Ensure viewer can continue to function if GUI is closed
os.environ.pop('CALIBRE_WORKER_TEMP_DIR', None)
parser = option_parser() parser = option_parser()
opts, args = parser.parse_args(args) opts, args = parser.parse_args(args)
pid = os.fork() if False and (islinux or isfreebsd) else -1 pid = os.fork() if False and (islinux or isfreebsd) else -1

View File

@ -105,7 +105,7 @@ def main():
notifier.start() notifier.start()
result = func(*args, **kwargs) result = func(*args, **kwargs)
if result is not None: if result is not None and os.path.exists(os.path.dirname(resultf)):
cPickle.dump(result, open(resultf, 'wb'), -1) cPickle.dump(result, open(resultf, 'wb'), -1)
notifier.queue.put(None) notifier.queue.put(None)