0603769c8316 — Peter Sanchez 13 years ago
Switched to use base64.b64encode to avoid newlines. Ticket #1
1 files changed, 2 insertions(+), 2 deletions(-)

M zerigodns/api.py
M zerigodns/api.py +2 -2
@@ 80,7 80,7 @@ class ZerigoDNS(object):
         self.key = key
     
     def get_auth_header(self):
-        base64str = base64.encodestring('%s:%s' % (self.user, self.key))
+        base64str = base64.b64encode('%s:%s' % (self.user, self.key))
         return {
             'Authorization': 'Basic %s' % base64str,
             'Accept': 'application/xml',

          
@@ 642,4 642,4 @@ class NSHostTemplate(ZerigoDNS):
         xml = self.send_request(method='GET', id=self.id)
         data = self.parse(xml)
         self.load(data['host-template'])
-        return self
  No newline at end of file
+        return self