cyris.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:cyris 作者: crond-jaist 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号