Exemple #1
0
def set_addon_version(addon_dir, version):
    filename = os.path.join(addon_dir, 'addon.xml')
    xml = ET.parse(filename).getroot()
    addon = xam.Addon(xml)
    addon.version = version
    write_file(filename, addon.to_xml_string())
Exemple #2
0
def get_addon_id(addon_dir):
    filename = os.path.join(addon_dir, 'addon.xml')
    xml = ET.parse(filename).getroot()
    return xam.Addon(xml).id