jesserizzo / envoy_reader

MIT License
37 stars 26 forks source link

Add await for Get method and Check for blank response from info.xml page #7

Closed gtdiehl closed 5 years ago

gtdiehl commented 5 years ago

The requests.get(...) mthod in the detect_model function did not have an await, which would cause the request to fail when retrieving the Envoy model C page of 'http://IP_ADDR/api/v1/production'

On the Envoy Model C there is no webpage of http://IP_ADDR/info.xml, so the response will be blank. This check only runs if the response in not blank

jesserizzo commented 5 years ago

Looks great, thanks.