Skip to content

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