Allow empty password

This commit is contained in:
Julien Duponchelle committed 2016-05-26 13:32:52 +02:00
1 parent 84b12fd953
commit fbc04e083b
1 file changed
+6 -2
+6 -2
View File
@@ -78,8 +78,12 @@ class Compute:
self._auth = None
else:
self._user = user.strip()
self._password = password.strip()
self._auth = aiohttp.BasicAuth(self._user, self._password)
if password:
self._password = password.strip()
self._auth = aiohttp.BasicAuth(self._user, self._password)
else:
self._password = None
self._auth = aiohttp.BasicAuth(self._user, "")
@asyncio.coroutine
def update(self, **kwargs):