mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #7276 (Viewer crash on main app close. (v0.7.24))
This commit is contained in:
parent
4110646e8a
commit
138d503aba
@ -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
|
||||||
|
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user