mirror of https://github.com/apache/cloudstack.git
Merge remote-tracking branch 'origin/4.11' into 4.12
This commit is contained in:
commit
ef1506b0b0
|
|
@ -78,7 +78,9 @@ def handleMigrateBegin():
|
|||
|
||||
|
||||
def executeCustomScripts(sysArgs):
|
||||
createDirectoryIfNotExists(customDir, customDirPermissions)
|
||||
if not os.path.exists(customDir) or not os.path.isdir(customDir):
|
||||
return
|
||||
|
||||
scripts = getCustomScriptsFromDirectory()
|
||||
|
||||
for scriptName in scripts:
|
||||
|
|
@ -127,12 +129,6 @@ def getCustomScriptsFromDirectory():
|
|||
os.listdir(customDir)), key=lambda fileName: substringAfter(fileName, '_'))
|
||||
|
||||
|
||||
def createDirectoryIfNotExists(dir, permissions):
|
||||
if not os.path.exists(dir):
|
||||
logger.info('Directory %s does not exist; creating it.' % dir)
|
||||
os.makedirs(dir, permissions)
|
||||
|
||||
|
||||
def substringAfter(s, delimiter):
|
||||
return s.partition(delimiter)[2]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue