digital_ocean #3438: use get instead of [] to prevent KeyError
The existing code was using: a[b][c[d]] where a[b] would always exist and c[d] would always exist. But the nested index would not alway exist, particularly when a DigitalOcean item disapeared. This changes that nested index to a `get` and properly handles None results. This bug was present in two spots in this file.
Showing
Please
register
or
sign in
to comment