onelogin / onelogin-python-aws-assume-role

MIT License
58 stars 52 forks source link

Fix for #26 #27

Closed kylecrawshaw closed 5 years ago

kylecrawshaw commented 5 years ago

This fixes issue #26 when run in Docker. writer is module in the package aws_assume_role and should always be called as from aws_assume_role import writer or from aws_assume_role.writer import ConfigFileWriter.

pitbulk commented 5 years ago

@kylecrawshaw, With this solution, if I execute:

git clone git@github.com:onelogin/onelogin-python-aws-assume-role.git
cd onelogin-python-aws-assume-role
virtualenv venv
python setup.py develop
python src/aws_assume_role/aws_assume_role.py

I got

Traceback (most recent call last):
  File "src/aws_assume_role/aws_assume_role.py", line 17, in <module>
    from aws_assume_role.writer import ConfigFileWriter
  File "/home/user/onelogin-python-aws-assume-role/src/aws_assume_role/aws_assume_role.py", line 17, in <module>
    from aws_assume_role.writer import ConfigFileWriter
ImportError: No module named writer

Maybe the name of the module conflicts with the name of the file?

pitbulk commented 5 years ago

@kylecrawshaw were you able to review this?