Skip to content

Commit

Permalink
Remove dead code path using cached password
Browse files Browse the repository at this point in the history
Only the token is actually being stored, which is obtained either from the user entering it or by exchanging a user-entered password (and possibly a 2FA code) for a token.
  • Loading branch information
donnemartin committed May 14, 2016
1 parent 3f27863 commit 98596fa
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions gitsome/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,8 @@ def authenticate_cached_credentials(self, config, parser):
token=self.user_token,
two_factor_callback=self.request_two_factor_code)
except configparser.NoOptionError:
self.user_pass = parser.get(self.CONFIG_SECTION,
self.CONFIG_USER_PASS)
self.api = self.login(
username=self.user_login,
password=self.user_pass,
two_factor_callback=self.request_two_factor_code)
self.print_auth_error()
return
try:
self.user_feed = parser.get(self.CONFIG_SECTION,
self.CONFIG_USER_FEED)
Expand Down Expand Up @@ -502,9 +498,6 @@ def save_config(self):
parser.set(self.CONFIG_SECTION,
self.CONFIG_USER_LOGIN,
self.user_login)
parser.set(self.CONFIG_SECTION,
self.CONFIG_USER_PASS,
self.user_pass)
parser.set(self.CONFIG_SECTION,
self.CONFIG_USER_TOKEN,
self.user_token)
Expand Down

0 comments on commit 98596fa

Please sign in to comment.