[scripts] Avoid deleting Oem Schemas During Update
Don't delete Oem json and xml files.
Change-Id: I2e4e2a49c776442c5d5e9d85400d3f6dba1f1d5a
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/scripts/update_schemas.py b/scripts/update_schemas.py
index 11c0325..a656cc4 100755
--- a/scripts/update_schemas.py
+++ b/scripts/update_schemas.py
@@ -8,6 +8,7 @@
from distutils.version import StrictVersion
import shutil
import json
+import glob
import xml.etree.ElementTree as ET
@@ -34,7 +35,9 @@
# Remove the old files
if os.path.exists(schema_path):
- shutil.rmtree(schema_path)
+ files = glob.glob(os.path.join(schema_path, '[!Oem]*'))
+ for f in files:
+ os.remove(f)
if os.path.exists(json_schema_path):
files = glob.glob(os.path.join(json_schema_path, '[!Oem]*'))
for f in files: