mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 17:26:36 -04:00
don't try to remove tmp folder if it's already been removed
This commit is contained in:
parent
ac57174fc0
commit
a2c9b160ca
1 changed files with 2 additions and 1 deletions
|
@ -296,6 +296,7 @@ def tmpdir():
|
||||||
global _tmpdir
|
global _tmpdir
|
||||||
if not _tmpdir:
|
if not _tmpdir:
|
||||||
def cleanup():
|
def cleanup():
|
||||||
|
if os.path.exists(_tmpdir):
|
||||||
shutil.rmtree(_tmpdir)
|
shutil.rmtree(_tmpdir)
|
||||||
import atexit
|
import atexit
|
||||||
atexit.register(cleanup)
|
atexit.register(cleanup)
|
||||||
|
|
Loading…
Reference in a new issue