1. Peter Sanchez
  2. zerigodns

Commits

Peter Sanchez  committed dfbf174

Working NSHost class

  • Participants
  • Parent commits c86cd60
  • Branches default

Comments (0)

Files changed (1)

File zerigodns.py

View file
  • Ignore whitespace
         if self._is_protected(name):
             super(ZerigoDNS, self).__setattr__(name, val)
         else:
+            name = name.replace('_', '-')
             self.vals[name] = val
     
     def __delattr__(self, name):
         conn.close()
         
         # Handle header data
-        for header, value in res.getheaders():
-            self.response_headers[header] = value
+        self.response_headers.update(res.getheaders())
         self.count = int(res.getheader('X-Query-Count', 0))
         
         if self.is_debug:
             # Create new instance
             result = self.send_request(method='POST', request=data)
             if not self.has_errors():
-                self.load(self.parse(result)['zone'])
+                self.load(self.parse(result)[self.element[:-1]])
                 loc = self.response_headers.get('Location', None)
                 if loc is not None:
                     p = urlparse.urlparse(loc)