-
Erin (Josh) Rigler authored
ObsPy's waveserver.py (and associated methods) do not handle an empty buffer returned from Edge's earthworm server. In short, they generate a None value instead of an empty byte string as one might expect (and they clearly did expect, since they attempted `len(dat)` where dat was expected to be a byte string, but was a None object if/when Edge had no data. This fix employs a try/except clause to generate an empty string if the waveserver client fails with a TypeError, as is the case when Edge returns an empty buffer.
Erin (Josh) Rigler authoredObsPy's waveserver.py (and associated methods) do not handle an empty buffer returned from Edge's earthworm server. In short, they generate a None value instead of an empty byte string as one might expect (and they clearly did expect, since they attempted `len(dat)` where dat was expected to be a byte string, but was a None object if/when Edge had no data. This fix employs a try/except clause to generate an empty string if the waveserver client fails with a TypeError, as is the case when Edge returns an empty buffer.