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())
def get_addon_id(addon_dir): filename = os.path.join(addon_dir, 'addon.xml') xml = ET.parse(filename).getroot() return xam.Addon(xml).id