CLI: make re match exactly for -l, -L
This commit is contained in:
parent
5cfb8b1e17
commit
7e58e2254d
@ -183,7 +183,7 @@ class CLIDbManager(object):
|
||||
(name, dirpath, path_name, last,
|
||||
tval, enable, stock_id, backend_type, version) = item
|
||||
if (database_names is None or
|
||||
any([re.match(dbname, name) for dbname in database_names])):
|
||||
any([re.match("^" + dbname + "$", name) for dbname in database_names])):
|
||||
summary = self.get_dbdir_summary(dirpath, name)
|
||||
print(_("Family Tree \"%s\":") % summary[_("Family Tree")])
|
||||
for item in sorted(summary):
|
||||
@ -203,7 +203,7 @@ class CLIDbManager(object):
|
||||
(name, dirpath, path_name, last,
|
||||
tval, enable, stock_id, backend_type, version) = item
|
||||
if (database_names is None or
|
||||
any([re.match(dbname, name) for dbname in database_names])):
|
||||
any([re.match("^" + dbname + "$", name) for dbname in database_names])):
|
||||
retval = self.get_dbdir_summary(dirpath, name)
|
||||
summary_list.append( retval )
|
||||
return summary_list
|
||||
|
Loading…
Reference in New Issue
Block a user