Skip to content

Commit

Permalink
Using the new way of declaring properties of objects
Browse files Browse the repository at this point in the history
  • Loading branch information
koalalorenzo committed Oct 7, 2014
1 parent 7462af4 commit 9a77899
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions digitalocean/Domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ def __init__(self, *args, **kwargs):
def load(self):
# URL https://api.digitalocean.com/v2/domains
domains = self.get_data("domains/%s" % self.name)
domain = domains[u'domain']
self.zone_file = domain[u'zone_file']
self.ttl = domain[u'ttl']
self.name = domain[u'name']

for attr in domains.keys():
setattr(self,attr,droplet[attr])

def destroy(self):
"""
Expand Down

0 comments on commit 9a77899

Please sign in to comment.