CC-2589 : Create organize dir for updates
This commit is contained in:
parent
40fd2cf8d7
commit
a57e5bd557
|
@ -25,8 +25,15 @@ config = ConfigParser.RawConfigParser()
|
||||||
config.read('/etc/airtime/airtime.conf')
|
config.read('/etc/airtime/airtime.conf')
|
||||||
stor_dir = config.get('general', 'base_files_dir') + "/stor"
|
stor_dir = config.get('general', 'base_files_dir') + "/stor"
|
||||||
|
|
||||||
if not os.path.exists(stor_dir + '/organize'):
|
try:
|
||||||
os.makedirs(stor_dir + '/organize')
|
os.makedirs(stor_dir + '/organize')
|
||||||
|
omask = os.umask(0)
|
||||||
|
os.chmod(stor_dir + '/organize', 02777)
|
||||||
|
|
||||||
|
except Exception, e:
|
||||||
|
print e
|
||||||
|
finally:
|
||||||
|
os.umask(omask)
|
||||||
|
|
||||||
mmconfig.storage_directory = os.path.normpath(stor_dir)
|
mmconfig.storage_directory = os.path.normpath(stor_dir)
|
||||||
mmconfig.imported_directory = os.path.normpath(stor_dir + '/imported')
|
mmconfig.imported_directory = os.path.normpath(stor_dir + '/imported')
|
||||||
|
|
Loading…
Reference in New Issue