Skip to content
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

fix s3cfg_path handling when HOME does not exists #172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

honza801
Copy link

@honza801 honza801 commented Feb 6, 2020

following exception occurs when enviromental variable HOME is not set in s3_keys_from_s3cfg method

Exception UnboundLocalError: local variable 's3cfg_path' referenced before assignment

exception is triggered by accessing the dictionary key HOME which does not exist, resulting in s3cfg_path is not set. but then, the variable s3cfg_path is sadly used in the Exception handling.

this patch fixes this by checking the presence of HOME environmental variable. if not found, method returns None

following exception occurs when enviromental variable HOME is not set in s3_keys_from_s3cfg method

Exception UnboundLocalError: local variable 's3cfg_path' referenced before assignment

exception is triggered by accessing the dictionary key HOME which does not exist, resulting in s3cfg_path is not set. but then, the variable s3cfg_path is sadly used in the Exception handling.

this patch fixes this by checking the presence of HOME environmental variable. if not found, method returns None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant