kvmremote.py 文件源码

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

项目:CAPE 作者: ctxis 项目源码 文件源码
def _connect(self, label=None):
        """Connects to libvirt subsystem.
            @raise CuckooMachineError: when unable to connect to libvirt.
            """
        # Check if a connection string is available.

        dsn = self.options.get(label).get("dsn", None)

        if not dsn:
            raise CuckooMachineError("You must provide a proper "
                                     "connection string for "+label)

        try:
            return libvirt.open(dsn)
        except libvirt.libvirtError:
            raise CuckooMachineError("Cannot connect to libvirt")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号