1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-09 22:38:19 +02:00

Update gmail.py

This commit is contained in:
Alex Lovell-Troy 2014-05-29 07:31:14 -06:00
parent 857643e978
commit ea793545d9

View file

@ -6,8 +6,8 @@ class GmailImapTransport(ImapTransport):
# Try to use oauth2 first. It's much safer
try:
self._connect_oauth(username)
except (TypeError, ValueError), e:
print " Couldn't do oauth2", e
except (TypeError, ValueError) as e:
print " Couldn't do oauth2 because %s" % e
self.server = self.transport(self.hostname, self.port)
typ, msg = self.server.login(username, password)
self.server.select()