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()
评论列表
文章目录