Skip to content

only save token to disk if reuse session is true - #81

Merged
tchellomello merged 2 commits into
python-ring-doorbell:masterfrom
andrewkress:dont-save-cache
May 16, 2018
Merged

only save token to disk if reuse session is true#81
tchellomello merged 2 commits into
python-ring-doorbell:masterfrom
andrewkress:dont-save-cache

Conversation

@andrewkress

Copy link
Copy Markdown
Contributor

move the _save_cache(self.cache, self.cache_file) inside the if statement
so when we are not reusing the session it does not attempt to persist the
token to disk. This resolves issue #79

…ment

so when we are not reusing the session it does not attempt to persist the token
to disk.
Comment thread ring_doorbell/__init__.py Outdated
if self._reuse_session:
self.cache['account'] = self.username
self.cache['token'] = self.token
_save_cache(self.cache, self.cache_file)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IndentationError: unindent does not match any outer indentation level

@coveralls

coveralls commented Jan 9, 2018

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 65.931% when pulling 28cdfc7 on andrewkress:dont-save-cache into 07d7206 on tchellomello:master.

@coveralls

coveralls commented Jan 9, 2018

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 65.931% when pulling 28cdfc7 on andrewkress:dont-save-cache into 07d7206 on tchellomello:master.

@andrewkress

Copy link
Copy Markdown
Contributor Author

does this have any relation to this pylint issue? Works in my 3.5 environment as expected.

@tchellomello
tchellomello merged commit e845bbc into python-ring-doorbell:master May 16, 2018
@tchellomello

Copy link
Copy Markdown
Member

Thanks for your contribution @andrewkress.
I'll address the lint issue on a later commit. You can see the details at https://travis-ci.org/tchellomello/python-ring-doorbell/jobs/326837849

@tchellomello tchellomello mentioned this pull request May 16, 2018
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants