def promote_cv(dryrun, lifecycle):
print "Running Content View Promotion to " + lifecycle + "..."
# Set the initial state
good_promote = False
if not dryrun:
rc = subprocess.call(['/usr/local/bin/promote_content_views', '-q', '-e', lifecycle])
else:
msg = "Dry run - not actually performing promotion"
helpers.log_msg(msg, 'WARNING')
rc = subprocess.call(['/usr/local/bin/promote_content_views', '-q', '-d', '-e', lifecycle])
if rc == 0:
good_promote = True
return good_promote
评论列表
文章目录