-
Notifications
You must be signed in to change notification settings - Fork 432
Conversation
|
||
from oauth2client import client | ||
|
||
|
||
__author__ = 'jcgregorio@google.com (Joe Gregorio)' | ||
|
||
|
||
_IS_DIR_MESSAGE = '{0}: Is a directory' | ||
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
PR updated. I moved the directory housekeeping into the test function, similar to the sym link test. Both of those can be pulled into fixtures when we get to that point. Also, should I submit an issue about possible removing the "no symbolic link" requirement? That way we can host any discussion there? |
Sounds reasonable. |
|
||
from oauth2client import client | ||
|
||
|
||
__author__ = 'jcgregorio@google.com (Joe Gregorio)' | ||
|
||
_SYM_LINK_MESSAGE = 'File: {0}: Is a symbolic link.' | ||
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Commit message is stale, but no need to worry about updating it until we've found consensus. |
& we can always re-write it when we merge. |
Updated PR and commit message |
f = open(FILENAME, 'wb') | ||
pickle.dump(credentials, f) | ||
f.close() | ||
cred_file = open(FILENAME, 'wb') |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
db4c7e1
to
2622958
Compare
* Move `validate_file` to `oauth2client.util` * Warn user if storage file is missing * Raise an `IOError` exception if the given filename is a directory. * Raise an `IOError` exception if the given filename is a symbolic link. (Previously raised `CredentialsFileSymbolicLinkError`) * (test) Expanding single-letter variables * (test) `assertEqual(None, <obj>)` -> `assertIsNone(<obj>)` * (test) `assertNotEqual(None, <obj>)` -> `assertIsNotNone(<obj>)`
I'm satisfied; @jonparrott will re-review since this has changed a bit. |
Thanks, @pferate! |
No problem @jonparrott! |
Also warn user if the given filename is a directory.
Resolves #338