(self, token_file, client_id, client_secret, url=None)
| 28 | |
| 29 | class GoogleSession(dav.DAVSession): |
| 30 | def __init__(self, token_file, client_id, client_secret, url=None): |
| 31 | # Required for discovering collections |
| 32 | if url is not None: |
| 33 | self.url = url |
| 34 | |
| 35 | self.useragent = client_id |
| 36 | self._settings = {} |
| 37 | |
| 38 | if not have_oauth2: |
| 39 | raise exceptions.UserError('requests-oauthlib not installed') |
| 40 | |
| 41 | token_file = expand_path(token_file) |
| 42 | ui_worker = get_ui_worker() |
| 43 | f = lambda: self._init_token(token_file, client_id, client_secret) |
| 44 | ui_worker.put(f) |
| 45 | |
| 46 | def _init_token(self, token_file, client_id, client_secret): |
| 47 | token = None |
no test coverage detected