Commit 560fcf57 authored by Julien Muchembled's avatar Julien Muchembled

No need to import 'base64' module

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