forked from mirror/django-mailbox
Update gmail.py
This commit is contained in:
parent
857643e978
commit
ea793545d9
1 changed files with 2 additions and 2 deletions
|
|
@ -6,8 +6,8 @@ class GmailImapTransport(ImapTransport):
|
||||||
# Try to use oauth2 first. It's much safer
|
# Try to use oauth2 first. It's much safer
|
||||||
try:
|
try:
|
||||||
self._connect_oauth(username)
|
self._connect_oauth(username)
|
||||||
except (TypeError, ValueError), e:
|
except (TypeError, ValueError) as e:
|
||||||
print " Couldn't do oauth2", e
|
print " Couldn't do oauth2 because %s" % e
|
||||||
self.server = self.transport(self.hostname, self.port)
|
self.server = self.transport(self.hostname, self.port)
|
||||||
typ, msg = self.server.login(username, password)
|
typ, msg = self.server.login(username, password)
|
||||||
self.server.select()
|
self.server.select()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue