summaryrefslogtreecommitdiff
path: root/utils/nwztools/database/gen_db.py
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2019-04-22 23:32:18 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2019-04-22 23:45:33 +0200
commit063ff294a266f68ab93f462c264613c2223a40cd (patch)
tree908e17e4b85667748b4ecac3c926628e3c8b1436 /utils/nwztools/database/gen_db.py
parente41a563b6cda71b8c973e884f47140087ebcd5ff (diff)
downloadrockbox-063ff294a266f68ab93f462c264613c2223a40cd.tar.gz
rockbox-063ff294a266f68ab93f462c264613c2223a40cd.zip
nwztools: add DMP-Z1 to the database
This is one of those fancy gold-plated devices. Of course it breaks my scripts that were nicely expecting every device to start with NW. Change-Id: I161320f620f65f4f92c2650d192b26a9831eeb9d
Diffstat (limited to 'utils/nwztools/database/gen_db.py')
-rwxr-xr-xutils/nwztools/database/gen_db.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/nwztools/database/gen_db.py b/utils/nwztools/database/gen_db.py
index 23f4e3f474..9e8bc89102 100755
--- a/utils/nwztools/database/gen_db.py
+++ b/utils/nwztools/database/gen_db.py
@@ -46,12 +46,12 @@ with open('series.txt') as fp:
46g_hash_nvp = dict() # hash -> nvp 46g_hash_nvp = dict() # hash -> nvp
47g_nvp_hash = dict() # codename -> hash 47g_nvp_hash = dict() # codename -> hash
48HASH_SIZE=6 48HASH_SIZE=6
49map_files = glob.glob('nvp/nw*.txt') 49map_files = glob.glob('nvp/nw*.txt') + glob.glob('nvp/dmp*.txt')
50for f in map_files: 50for f in map_files:
51 h = hashlib.md5() 51 h = hashlib.md5()
52 h.update(open(f, "rb").read()) 52 h.update(open(f, "rb").read())
53 hash = h.hexdigest() 53 hash = h.hexdigest()
54 codename = re.search('(nw.*)\.txt', f).group(1) 54 codename = re.search('nvp/([^\.]*)\.txt', f).group(1)
55 # sanity check 55 # sanity check
56 if not (codename in g_series_codename): 56 if not (codename in g_series_codename):
57 print("Warning: file %s does not have a match series in series.txt" % f) 57 print("Warning: file %s does not have a match series in series.txt" % f)