
Comment: An exception occurred in this state: Traceback (most recent call last):

 "/usr/lib/python2.7/dist-packages/salt/state.py", line 1563, in call
**cdata['kwargs'])

 "/usr/lib/python2.7/dist-packages/salt/states/file.py", line 1373, in managed
if contents and not contents.endswith('\n'):
AttributeError: 'list' object has no attribute 'endswith'
Started: 14:54:56.238368
Traceback (most recent call last):


 "/home/adys/src/git/hsreplaynet/dj-stripe/.tox/py36-django111/lib/python3.6/site-packages/mock/mock.py", line 1305, in patched

return func(*args, **keywargs)


 "/home/adys/src/git/hsreplaynet/dj-stripe/tests/test_sync.py", line 38, in test_sync_success

sync_subscriber(self.user)


 "/home/adys/src/git/hsreplaynet/dj-stripe/djstripe/sync.py", line 18, in sync_subscriber

customer, _created = Customer.get_or_create(subscriber=subscriber)


 "/home/adys/src/git/hsreplaynet/dj-stripe/djstripe/models.py", line 206, in get_or_create

return cls.create(subscriber, idempotency_key=idempotency_key), True


 "/home/adys/src/git/hsreplaynet/dj-stripe/djstripe/models.py", line 217, in create

defaults={"subscriber": subscriber, "livemode": stripe_customer["livemode"]}


 "/home/adys/src/git/hsreplaynet/dj-stripe/.tox/py36-django111/lib/python3.6/site-packages/django/db/models/manager.py", line 85, in manager_method

return getattr(self.get_queryset(), name)(*args, **kwargs)


 "/home/adys/src/git/hsreplaynet/dj-stripe/.tox/py36-django111/lib/python3.6/site-packages/django/db/models/query.py", line 459, in get_or_create

lookup, params = self._extract_model_params(defaults, **kwargs)


 "/home/adys/src/git/hsreplaynet/dj-stripe/.tox/py36-django111/lib/python3.6/site-packages/django/db/models/query.py", line 521, in _extract_model_params

property_names = self.model._meta._property_names


 "/home/adys/src/git/hsreplaynet/dj-stripe/.tox/py36-django111/lib/python3.6/site-packages/django/utils/functional.py", line 35, in __get__

res = instance.__dict__[self.name] = self.func(instance)


 "/home/adys/src/git/hsreplaynet/dj-stripe/.tox/py36-django111/lib/python3.6/site-packages/django/db/models/options.py", line 887, in _property_names

dir(self.model) if isinstance(getattr(self.model, attr), property)


 "/home/adys/src/git/hsreplaynet/dj-stripe/.tox/py36-django111/lib/python3.6/site-packages/django/db/models/options.py", line 887, in <setcomp>

dir(self.model) if isinstance(getattr(self.model, attr), property)


 "/home/adys/src/git/hsreplaynet/dj-stripe/.tox/py36-django111/lib/python3.6/site-packages/jsonfield/subclassing.py", line 35, in __get__

raise AttributeError('Can only be accessed via an instance.')
AttributeError: Can only be accessed via an instance.
