[bugfix] network/station interchanged leading to huge load times for

metatada
This commit is contained in:
Marcel Paffrath 2019-03-06 14:50:58 +01:00
parent a9d92e70ce
commit 6032018067

View File

@ -231,7 +231,7 @@ class Metadata(object):
resp = metadata['data'].get_response(seed_id, time)
return resp.get_paz(seed_id)
def _read_inventory_data(self, seed_id=None):
def _read_inventory_data(self, seed_id):
for inventory in self.inventories:
if self._read_metadata_iterator(path_to_inventory=inventory, station_seed_id=seed_id):
return
@ -240,8 +240,8 @@ class Metadata(object):
"""
Search for metadata for a specific station iteratively.
"""
station, network, location, channel = station_seed_id.split('.')
# search for station seed id in filenames in inventory
network, station, location, channel = station_seed_id.split('.')
# seach for station seed id in filenames in invetory
fnames = glob.glob(os.path.join(path_to_inventory, '*' + station_seed_id + '*'))
if not fnames:
# search for station name in filename