livegrenier opened a new pull request, #1681:
URL: https://github.com/apache/libcloud/pull/1681
## Adding expires condition when API does not return an expired item
### Description
Hello, when testing the GoDaddy API on multiple of my domains i have
observed that not all my domains return an expired field, adding this condition
prevents the following error:
```
Traceback (most recent call last):
File
"/usr/local/lib/python3.7/site-packages/libcloud/dns/drivers/godaddy.py", line
149, in list_zones
zones = self._to_zones(result)
File
"/usr/local/lib/python3.7/site-packages/libcloud/dns/drivers/godaddy.py", line
433, in _to_zones
zones.append(self._to_zone(item))
File
"/usr/local/lib/python3.7/site-packages/libcloud/dns/drivers/godaddy.py", line
437, in _to_zone
extra = {"expires": item['expires']}
KeyError: 'expires'
```
### Status
- done, ready for review
### Checklist (tick everything that applies)
- [x] [Code
linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide)
(required, can be done after the PR checks)
- [ ] Documentation
- [x] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html)
- [ ]
[ICLA](http://libcloud.readthedocs.org/en/latest/development.html#contributing-bigger-changes)
(required for bigger changes)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]