Pass empty password when using token

This commit is contained in:
2016-04-13 15:32:10 +02:00
parent 463eb068f6
commit e6ef3c2332

View File

@@ -60,7 +60,7 @@ class Api(object):
for retrieving the token.
"""
if token:
credentials = "{0}:0".format(token)
credentials = "{0}:".format(token)
else:
credentials = "%s:%s" % (self.username, self.password)
return base64.b64encode(credentials.encode('utf-8')).decode('utf-8').replace("\n", "")