-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add session passing to functions #4
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 1 1
Lines 155 158 +3
Branches 18 21 +3
=====================================
+ Hits 155 158 +3
Continue to review full report at Codecov.
|
def get_password(service, username): | ||
session = get_session(os.environ) | ||
def get_password(service, username, session=None): | ||
if session == None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if session == None: | |
if session is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about passing session to get_session()
and doing the check over there ? This way, we won't have the check in multiple places in the code ?
get_password
,set_password
, anddelete_password
functions. Default =None
.