thefactory/marathon-python

client's 'get_info' fails due to unexpected keyword argument in Marathon 1.5.2

Opened this issue · 1 comments

I'm getting the following when querying info:

  File "/usr/local/lib/python2.7/dist-packages/marathon/client.py", line 698, in get_info
    if force:
  File "/usr/local/lib/python2.7/dist-packages/marathon/client.py", line 65, in _parse_response
  File "/usr/local/lib/python2.7/dist-packages/marathon/models/base.py", line 43, in from_json
    return cls(**{to_snake_case(k): v for k, v in attributes.items()})
  File "/usr/local/lib/python2.7/dist-packages/marathon/models/info.py", line 41, in __init__
    else MarathonConfig().from_json(marathon_config)
  File "/usr/local/lib/python2.7/dist-packages/marathon/models/base.py", line 43, in from_json
    return cls(**{to_snake_case(k): v for k, v in attributes.items()})
TypeError: __init__() got an unexpected keyword argument 'revive_offers_repetitions'

I'm using marathon-python 0.9.3 and Marathon 1.5.2

I've experienced this error as well when I upgraded from Marathon 1.4.8 to 1.4.9, likely the inclusion of "revive_offers_repetitions" into the JSON was considered a bug fix since that command-line flag has been around for a while. I've tested a fix in my fork, and can open a PR next week.