From 9d011c4b7a288a22af9a2be716fb9f1a0eac60c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matteo=20=E2=84=B1an?= Date: Tue, 14 May 2019 21:59:43 +0200 Subject: [PATCH] Delete kmsDB2Dict.py --- py2-kms/kmsDB2Dict.py | 45 ------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 py2-kms/kmsDB2Dict.py diff --git a/py2-kms/kmsDB2Dict.py b/py2-kms/kmsDB2Dict.py deleted file mode 100644 index 6f9b0f4..0000000 --- a/py2-kms/kmsDB2Dict.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python - -import os -import xml.etree.ElementTree as ET - -def kmsDB2Dict(): - path = os.path.join(os.path.dirname(__file__), 'KmsDataBase.xml') - root = ET.parse(path).getroot() - - kmsdb, child1, child2, child3 = [ [] for _ in range(4) ] - - ## Get winbuilds. - for winbuild in root.iter('WinBuild'): - child1.append(winbuild.attrib) - - kmsdb.append(child1) - - ## Get csvlkitem data. - child1 = [] - for csvlk in root.iter('CsvlkItem'): - for activ in csvlk.iter('Activate'): - child2.append(activ.attrib['KmsItem']) - csvlk.attrib.update({'Activate' : child2}) - child1.append(csvlk.attrib) - child2 = [] - - kmsdb.append(child1) - - ## Get appitem data. - child1 = [] - for app in root.iter('AppItem'): - for kms in app.iter('KmsItem'): - for sku in kms.iter('SkuItem'): - child3.append(sku.attrib) - kms.attrib.update({'SkuItems' : child3}) - child2.append(kms.attrib) - child3 = [] - - app.attrib.update({'KmsItems' : child2}) - child1.append(app.attrib) - child2 = [] - - kmsdb.append(child1) - - return kmsdb