Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Platypush
platypush
Commits
12887b61
Commit
12887b61
authored
Apr 25, 2022
by
Fabio Manganiello
Browse files
Don't fail hard if the Linode API doesn't return a list of instances
parent
ca256072
Pipeline
#211
passed with stages
in 7 minutes and 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
platypush/backend/linode/__init__.py
View file @
12887b61
...
...
@@ -26,7 +26,7 @@ class LinodeBackend(SensorBackend):
self
.
instances
=
set
(
instances
or
[])
def
process_data
(
self
,
data
:
Dict
[
str
,
dict
],
new_data
:
Optional
[
Dict
[
str
,
dict
]]
=
None
,
**
kwargs
):
instances
=
data
[
'instances'
]
instances
=
data
.
get
(
'instances'
,
{})
old_instances
=
(
self
.
data
or
{}).
get
(
'instances'
,
{})
if
self
.
instances
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment