Commits

Peter Sanchez committed 0603769

Switched to use base64.b64encode to avoid newlines. Ticket #1

Comments (0)

Files changed (1)

         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',
         xml = self.send_request(method='GET', id=self.id)
         data = self.parse(xml)
         self.load(data['host-template'])
-        return self
+        return self