file_copy.py 文件源码

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

项目:pyhpecw7 作者: HPENetworking 项目源码 文件源码
def _get_remote_md5(self):
        """Return the md5 sum of the remote file,
        if it exists.
        """
        E = action_element_maker()
        top = E.top(
            E.FileSystem(
                E.Files(
                    E.File(
                        E.SrcName(self.dst),
                        E.Operations(
                            E.md5sum()
                        )
                    )
                )
            )
        )


        nc_get_reply = self.device.action(top)
        reply_ele = etree.fromstring(nc_get_reply.xml)
        md5sum = find_in_action('md5sum', reply_ele)

        if md5sum is not None:
            return md5sum.text.strip()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号