aboutsummaryrefslogtreecommitdiff
path: root/core.py
diff options
context:
space:
mode:
authortassaron2017-06-04 20:27:43 -0400
committertassaron2017-06-04 20:27:43 -0400
commit277e86f2795093deaa12f294c29ac2f951ae65cd (patch)
tree8da3101aef37216d6b47d60012eea3a9853eef3c /core.py
parent39e66ffa2d07b87b57ed90b369ab26aedf0a69e8 (diff)
not dumping frames anymore, but not working yet either
will finish later
Diffstat (limited to 'core.py')
-rw-r--r--core.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/core.py b/core.py
index ecbf12c..99403f1 100644
--- a/core.py
+++ b/core.py
@@ -15,6 +15,8 @@ class Core():
def __init__(self):
self.FFMPEG_BIN = self.findFfmpeg()
self.tempDir = os.path.join(tempfile.gettempdir(), 'audio-visualizer-python-data')
+ if not os.path.exists(self.tempDir):
+ os.makedirs(self.tempDir)
atexit.register(self.deleteTempDir)
def findFfmpeg(self):
@@ -94,8 +96,7 @@ class Core():
def deleteTempDir(self):
try:
- if os.path.exists(self.tempDir):
- rmtree(self.tempDir)
+ rmtree(self.tempDir)
except FileNotFoundError:
pass