[bugfix] #267 Remove stations from ArrayMap whose metadata files were removed

Fixes https://ariadne.geophysik.ruhr-uni-bochum.de/trac/PyLoT/ticket/267
This commit is contained in:
Darius Arnold
2018-12-07 11:19:54 +01:00
parent f1690edf71
commit 45949afca6
2 changed files with 7 additions and 0 deletions

View File

@@ -85,6 +85,9 @@ class Metadata(object):
for seed_id in self.seed_ids.keys():
if self.seed_ids[seed_id].startswith(path_to_inventory):
del (self.seed_ids[seed_id])
# have to clean self.stations_dict as well
# this will be rebuilt for the next init of the arraymap anyway, so just reset it
self.stations_dict = {}
def get_metadata(self, seed_id, time=None):
"""