Skip to content

Commit

Permalink
Considering the action_ids list only if that is available
Browse files Browse the repository at this point in the history
  • Loading branch information
koalalorenzo committed Sep 23, 2014
1 parent c7463e4 commit 87228e8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions digitalocean/Droplet.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,10 @@ def create(self, ssh_keys=None, backups=False, ipv6=False, private_networking=Fa
if data:
self.id = data['droplet']['id']

self.action_ids = []
for id in data[u'droplet'][u'action_ids']:
self.action_ids.append(id)
if data[u'droplet'].has_key(u"action_ids"):
self.action_ids = []
for id in data[u'droplet'][u'action_ids']:
self.action_ids.append(id)

def get_events(self):
"""
Expand Down

0 comments on commit 87228e8

Please sign in to comment.