thefactory/marathon-python — pull request #6 by adgaudio (2014-08-22 05:25:37+00:00)
Title: Bug Fix: Cannot define constraints with a tuple of strings

This PR is a very simple fix. Currently, if a user attempts to define the following situation:

```
dct = dict(constraints=[['hostname', 'UNIQUE']], << plus other key:value pairs >> )
client.create_app(**dct)
```

The marathon client raises the following exception:

```
File "/opt/anaconda/2.0.0/lib/python2.7/site-packages/marathon/client.py", line 88, in create_app
data = json.dumps(app.json_encode())
File "/opt/anaconda/2.0.0/lib/python2.7/site-packages/marathon/models/app.py", line 84, in json_encode
'constraints': [c.json_encode() for c in self.constraints],
AttributeError: 'unicode' object has no attribute 'json_encode'
```