mishbahr / djangocms-instagram

A simple but versatile Instagram plugin for your django-cms powered sites.
https://pypi.python.org/pypi/djangocms-instagram/
BSD 3-Clause "New" or "Revised" License
22 stars 8 forks source link

Fixed error format index #3

Closed jokerejoker closed 8 years ago

jokerejoker commented 8 years ago

When retrieving data from instagram but it failes, for what ever reason, the error logger breaks the execution because of a syntax error with str().format().

mishbahr commented 8 years ago

@jokerejoker Please can you change the line to this:

msg = _('Failed to retrieve media - Reason: {0}').format(e)

Python 2.6 and before (as well as Python 3.0) require that you number the placeholders:

'{0} {1}\n'.format(numb, foo)

We should be using named arguments. Make it easier to read but I'll do that.

Thanks.

jokerejoker commented 8 years ago

@mishbahr I have changed the variable to a key argument :)