def os_system(self, filename, command):
# Make sure the command is executed even if no filename is provided for the log file
if filename:
return_value = os.system("{0} >> {1} 2>&1".format(command, filename))
else:
return_value = os.system("{0} >> /dev/null".format(command))
exit_status = os.WEXITSTATUS(return_value)
if exit_status != 0:
print "* ERROR: cyris: Issue when executing command (exit status = %d):" % (exit_status)
print " %s" % (command)
print " Check the log file for details: %s" % (self.creation_log_file)
self.handle_error()
quit(-1)
else:
global RESPONSE_LIST
RESPONSE_LIST.append(exit_status)
#########################################################################
# Transmit information about cloning part in yaml file, send it to module
# class to create script 'instantiation/vm_clone/create_bridges.sh' and
# get the commands back
评论列表
文章目录