Gmail.py use hardcoded url variable 2/2
Because the call in the if and in the else blocks is the same, we can move it outside the conditional block. Code now is clear.
This commit is contained in:
@ -57,11 +57,11 @@ class GmailRepository(IMAPRepository):
|
||||
|
||||
url = super().getoauth2_request_url()
|
||||
if url is None:
|
||||
# Nothing was configured, cache and return hardcoded one.
|
||||
# Nothing was configured, use a hardcoded one.
|
||||
url = "https://accounts.google.com/o/oauth2/token"
|
||||
self.setoauth2_request_url(url)
|
||||
else:
|
||||
self.setoauth2_request_url(url)
|
||||
|
||||
self.setoauth2_request_url(url)
|
||||
|
||||
return self.oauth2_request_url
|
||||
|
||||
def getport(self):
|
||||
|
Reference in New Issue
Block a user