diff options
Diffstat (limited to 'utils/nwztools/database/gen_db.py')
-rwxr-xr-x | utils/nwztools/database/gen_db.py | 4 |
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: | |||
46 | g_hash_nvp = dict() # hash -> nvp | 46 | g_hash_nvp = dict() # hash -> nvp |
47 | g_nvp_hash = dict() # codename -> hash | 47 | g_nvp_hash = dict() # codename -> hash |
48 | HASH_SIZE=6 | 48 | HASH_SIZE=6 |
49 | map_files = glob.glob('nvp/nw*.txt') | 49 | map_files = glob.glob('nvp/nw*.txt') + glob.glob('nvp/dmp*.txt') |
50 | for f in map_files: | 50 | for 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) |