oss_xml_handler.py 文件源码

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

项目:mongodb_backup_script 作者: hxt168 项目源码 文件源码
def __init__(self, xml_string):
        try:
            self.xml = minidom.parseString(xml_string)
        except:
            print xml_string
        self.bucket = get_tag_text(self.xml, 'Bucket', convert_to_bool = False)
        self.type = get_tag_text(self.xml, 'Type', convert_to_bool = False)
        self.key = get_tag_text(self.xml, 'Key', convert_to_bool = False)
        self.last_modified = get_tag_text(self.xml, 'LastModified', convert_to_bool = False)
        self.etag = get_tag_text(self.xml, 'ETag', convert_to_bool = False)
        self.content_type = get_tag_text(self.xml, 'Content-Type')
        self.size = get_tag_text(self.xml, 'Size', convert_to_bool = False)
        self.parts = []
        parts = self.xml.getElementsByTagName('Part')
        for p in parts:
            self.parts.append(Part(p))
评论列表


问题


面经


文章

微信
公众号

扫码关注公众号