dnstools added comment to filename pattern

This commit is contained in:
ignis 2021-04-05 15:04:31 +09:00
parent b43035918b
commit 2d9b461003

View file

@ -7,8 +7,6 @@ class DnsCase:
import os
import re
p = re.compile("fort[.][0-9]{4,}")
# Case name
if case_name is None:
self.name = os.path.basename(case_root)
@ -19,6 +17,8 @@ class DnsCase:
self.case_root = os.path.abspath(case_root)
# List of data files. fort.xxxx[x*]
# matches fort.? files with more than 4 digits
p = re.compile("fort[.][0-9]{4,}")
self.data_files = (sorted(filter(p.match, os.listdir(case_root))))
# Read meta data from the first data file