CLI: require exact re.match for -t

This commit is contained in:
Doug Blank 2016-04-23 20:35:37 -04:00
parent 050e68e3e4
commit f0e89ef9d3

View File

@ -399,7 +399,7 @@ class ArgHandler(object):
for name, dirname in sorted(self.dbman.family_tree_list(),
key=lambda pair: pair[0].lower()):
if (self.database_names is None or
any([re.match(dbname, name) for dbname in self.database_names])):
any([re.match("^" + dbname + "$", name) for dbname in self.database_names])):
print(_("%(full_DB_path)s with name \"%(f_t_name)s\"")
% {'full_DB_path' : dirname, 'f_t_name' : name})
return