-fix annoying issue where media-monitor refuses to start if tmp directory

/var/tmp/airtime does not exist. Just create it.
This commit is contained in:
Martin Konecny 2012-02-06 12:28:39 -05:00
parent 214c6e85cc
commit e8afd086bd
1 changed files with 3 additions and 0 deletions

View File

@ -245,6 +245,9 @@ class MediaMonitorCommon:
return stdout.splitlines()
def touch_index_file(self):
dirname = os.path.dirname(self.timestamp_file)
if not os.path.exists(dirname):
os.makedirs(dirname)
open(self.timestamp_file, "w")
def organize_new_file(self, pathname):