Folgende Exception wird ignoriert, bzw. falsch behandelt:
TypeError("get() got an unexpected keyword argument 'raw'",)
boto/pyami/config.py
def get(self, section, name, default=None):
try:
val = ConfigParser.get(self, section, name)
except:
val = default
return val
Ich habe boto/pyami/config.py wie folgt angepasst:
def get(self, section, name, default=None):
try:
val = ConfigParser.get(self, section, name)
except Exception as e:
print(e)
if 'raw' in str(e):
val = ConfigParser.get(self, section, name)
val = default
return val
und nun bekomme ich eine länger Fehlermeldung, wo ich jetzt auch weiter komme...
EXCEPTION OCCURRED: get() got an unexpected keyword argument 'raw'
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/boto/pyami/config.py", line 142, in get
val = ConfigParser.get(self, section, name)
File "/usr/lib/python3.4/configparser.py", line 772, in get
d)
File "/usr/lib/python3.4/configparser.py", line 371, in before_get
self._interpolate_some(parser, option, L, value, section, defaults, 1)
File "/usr/lib/python3.4/configparser.py", line 384, in _interpolate_some
rawval = parser.get(section, option, raw=True, fallback=rest)
TypeError: get() got an unexpected keyword argument 'raw'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.4/dist-packages/sevenseconds/__main__.py", line 4, in <module>
sevenseconds.cli.main()
File "/usr/local/lib/python3.4/dist-packages/sevenseconds/cli.py", line 226, in main
cli()
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 680, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 508, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/sevenseconds/cli.py", line 123, in configure
get_aws_credentials(saml_user, saml_password, saml_url, saml_role, admin_account, 'adminaccount')
File "/usr/local/lib/python3.4/dist-packages/sevenseconds/cli.py", line 169, in get_aws_credentials
key_id, secret, session_token = assume_role(saml_xml, role[0], role[1])
File "/usr/local/lib/python3.4/dist-packages/aws_saml_login/saml.py", line 164, in assume_role
conn = boto.sts.connect_to_region('eu-west-1')
File "/usr/local/lib/python3.4/dist-packages/boto/sts/__init__.py", line 51, in connect_to_region
return region.connect(**kw_params)
File "/usr/local/lib/python3.4/dist-packages/boto/regioninfo.py", line 187, in connect
return self.connection_cls(region=self, **kw_params)
File "/usr/local/lib/python3.4/dist-packages/boto/sts/connection.py", line 107, in __init__
provider=provider)
File "/usr/local/lib/python3.4/dist-packages/boto/connection.py", line 1103, in __init__
provider=provider)
File "/usr/local/lib/python3.4/dist-packages/boto/connection.py", line 556, in __init__
profile_name)
File "/usr/local/lib/python3.4/dist-packages/boto/provider.py", line 200, in __init__
self.get_credentials(access_key, secret_key, security_token, profile_name)
File "/usr/local/lib/python3.4/dist-packages/boto/provider.py", line 363, in get_credentials
security_token_name)
File "/usr/local/lib/python3.4/dist-packages/boto/pyami/config.py", line 146, in get
val = ConfigParser.get(self, section, name)
File "/usr/lib/python3.4/configparser.py", line 772, in get
d)
File "/usr/lib/python3.4/configparser.py", line 371, in before_get
self._interpolate_some(parser, option, L, value, section, defaults, 1)
File "/usr/lib/python3.4/configparser.py", line 384, in _interpolate_some
rawval = parser.get(section, option, raw=True, fallback=rest)
TypeError: get() got an unexpected keyword argument 'raw'
Lösung: boto/boto#3370