forked from organicmaps/organicmaps
[python] Do not parse metadata for find_feature if find mode is not 'm'.
This commit is contained in:
parent
a0da74753a
commit
558ebdf259
1 changed files with 3 additions and 1 deletions
|
@ -9,7 +9,9 @@ def find_feature(path, typ, string):
|
|||
mwm.read_header()
|
||||
mwm.read_types(os.path.join(os.path.dirname(__file__),
|
||||
"..", "..", "..", "data", "types.txt"))
|
||||
for i, feature in enumerate(mwm.iter_features(metadata=True)):
|
||||
|
||||
parse_metadata = typ == "m"
|
||||
for i, feature in enumerate(mwm.iter_features(metadata=parse_metadata)):
|
||||
found = False
|
||||
if typ == "n" and "name" in feature["header"]:
|
||||
for value in feature["header"]["name"].values():
|
||||
|
|
Loading…
Add table
Reference in a new issue