Changeset 4757


Ignore:
Timestamp:
06/01/09 15:28:18 (11 years ago)
Author:
cbyrom
Message:

Expose encoded authentication details for eXist - so can re-use for
atom feed interface.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • exist/trunk/python/ndgUtils/eXistConnector.py

    r4494 r4757  
    7070        opener = urllib2.build_opener(authHandler) 
    7171        s = constants.userid+':'+constants.password  
    72         z = base64.encodestring(s)[:-1] # strip trailing 12 
    73         opener.addheaders.append(('Authorization', 'Basic %s' % z)) 
    74         self.http_headers = {'Authorization':'Basic %s' % z} 
     72        self.auth = base64.encodestring(s)[:-1] # strip trailing 12 
     73        opener.addheaders.append(('Authorization', 'Basic %s' % self.auth)) 
     74        self.http_headers = {'Authorization':'Basic %s' % self.auth} 
    7575        self.opener = opener 
    7676        # also create an xmlrpc Server object 
     
    158158        return self.xmlrpc.parse(xml,path,overwrite) 
    159159         
    160   
Note: See TracChangeset for help on using the changeset viewer.