[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 committed 2018-12-07 11:19:54 +01:00
1 parent f1690edf71
commit 45949afca6
2 files changed
+7

No files matched your search

+3
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):
"""