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 env var usage #281

Merged
merged 5 commits into from
Oct 27, 2023
Merged

Fix env var usage #281

merged 5 commits into from
Oct 27, 2023

Conversation

kripnerl
Copy link
Contributor

Changes:

Note:

Nevertheless, Windows compatibility was not tested since I do not have access to Windows at the moment.

@kripnerl kripnerl requested a review from orso82 October 27, 2023 13:07
Copy link
Member

@orso82 orso82 left a comment

Choose a reason for hiding this comment

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

looks great! One small typo.

omas/tests/failed_imports.py Outdated Show resolved Hide resolved
fix typo

Co-authored-by: Orso Meneghini <[email protected]>
@orso82
Copy link
Member

orso82 commented Oct 27, 2023

Regressions test fail. Sorry, I have never used pathlib and did not realize it does not behave like a standard string :/

ImportError: Failed to import test module: failed_imports
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/home/runner/work/omas/omas/omas/tests/failed_imports.py", line 45, in <module>
    if not os.path.exists(os.environ.get('AWS_CONFIG_FILE', pathlib.Path.home() + '/.aws/config')):
TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'

@kripnerl
Copy link
Contributor Author

Regressions test fail. Sorry, I have never used pathlib and did not realize it does not behave like a standard string :/

ImportError: Failed to import test module: failed_imports
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/home/runner/work/omas/omas/omas/tests/failed_imports.py", line 45, in <module>
    if not os.path.exists(os.environ.get('AWS_CONFIG_FILE', pathlib.Path.home() + '/.aws/config')):
TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'

My bad - I was a bit confused by the suggestion :-). Hopefully, it's fixed now.

@kripnerl
Copy link
Contributor Author

Btw pathlib is a very handy library - makes life much simpler!

@orso82 orso82 merged commit df8ae28 into master Oct 27, 2023
1 check passed
@orso82 orso82 deleted the fix-env-var-usage branch October 27, 2023 14:54
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.

2 participants