Commit 560fcf57 by Julien Muchembled

No need to import 'base64' module

1 parent 7a4f3c40
......@@ -12,8 +12,6 @@
#
##############################################################################
import base64
import hashlib
import httplib
import json
......@@ -85,10 +83,8 @@ class NetworkcacheClient(object):
user = parsed_url.username
passwd = parsed_url.password
if user is not None:
authentication_string = '%s:%s' % (user, passwd)
base64string = base64.encodestring(authentication_string).strip()
return_dict['header_dict']['Authorization'] = 'Basic %s' %\
base64string
('%s:%s' % (user, passwd)).encode('base64').strip()
return_dict['path'] = parsed_url.path
return_dict['host'] = parsed_url.hostname
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!