Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(908)

Side by Side Diff: third_party/oauth2client/locked_file.py

Issue 1074673002: Add OAuth2 support for end users (i.e. 3-legged flow with the browser). (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: windows lineendings for depot-tools-auth.bat Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2011 Google Inc. 1 # Copyright 2011 Google Inc.
2 # 2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); 3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License. 4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at 5 # You may obtain a copy of the License at
6 # 6 #
7 # http://www.apache.org/licenses/LICENSE-2.0 7 # http://www.apache.org/licenses/LICENSE-2.0
8 # 8 #
9 # Unless required by applicable law or agreed to in writing, software 9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, 10 # distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 17 matching lines...) Expand all
28 f.unlock_and_close() 28 f.unlock_and_close()
29 """ 29 """
30 30
31 __author__ = 'cache@google.com (David T McWherter)' 31 __author__ = 'cache@google.com (David T McWherter)'
32 32
33 import errno 33 import errno
34 import logging 34 import logging
35 import os 35 import os
36 import time 36 import time
37 37
38 from oauth2client import util 38 from . import util
39 39
40 logger = logging.getLogger(__name__) 40 logger = logging.getLogger(__name__)
41 41
42 42
43 class CredentialsFileSymbolicLinkError(Exception): 43 class CredentialsFileSymbolicLinkError(Exception):
44 """Credentials files must not be symbolic links.""" 44 """Credentials files must not be symbolic links."""
45 45
46 46
47 class AlreadyLockedException(Exception): 47 class AlreadyLockedException(Exception):
48 """Trying to lock a file that has already been locked by the LockedFile.""" 48 """Trying to lock a file that has already been locked by the LockedFile."""
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 Raises: 365 Raises:
366 AlreadyLockedException: if the lock is already acquired. 366 AlreadyLockedException: if the lock is already acquired.
367 IOError: if the open fails. 367 IOError: if the open fails.
368 """ 368 """
369 self._opener.open_and_lock(timeout, delay) 369 self._opener.open_and_lock(timeout, delay)
370 370
371 def unlock_and_close(self): 371 def unlock_and_close(self):
372 """Unlock and close a file.""" 372 """Unlock and close a file."""
373 self._opener.unlock_and_close() 373 self._opener.unlock_and_close()
OLDNEW
« no previous file with comments | « third_party/oauth2client/MODIFICATIONS.diff ('k') | third_party/oauth2client/multistore_file.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698