smeggingsmegger/PyDrive — pull request #2 by jgwak (2014-03-18 02:24:40+00:00)
Title: Fixed errors from modified settings structure

Thank you so much for your work.
I found that the code breaks after applying the changes I suggested and fixed it.
Please review my code. Thank you.

Changes to note
- *Fixed settings structure and settings loading procedure*: Settings structure was not written as what I originally intended in my comment. Sorry I might not have been clear enough. Also, there were some problems caused by changes in settings structure which I modified in this commit.
- *Removed requirement of user_email*: although service account without user email is meaningless in Drive API, the original intention of `GoogleAuth` class was to make generic authentication wrapper class for Google API. Service account can be authenticated without user email and API user might want to supply user email after he initialized GoogleAuth class to authorize multiple accounts in same domain.
- *Pycrypto has been deleted from installation guidance message*: Pycrypto's `SignedJwtAssertionCredentials` doesn't support p12 which is required to authenticate service account.
- *Added special flow for service account*: previous code didn't build the service after successful authentication because it waited for the OAuth code which is never returned in the service account. Previous code could somehow work from the build command in `LoadAuth`. Therefore, new flow for service account, `CheckServiceAuth` is added to build right after successful authentication without checking OAuth code.