make format strings python2.6 compatible

#1 Open
Repository
numerodix
Branch
default
Repository
tiran
Branch
default

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

hg update 
hg pull -r default https://bitbucket.org/numerodix/defusedxml
Author
  1. Martin Matusiak
Reviewers
Description

On Python 2.6:

>>> "{}".format("a")
ValueError: zero length field name in format
>>> "{0}".format("a")
'a'

This is unfortunate especially as it's used in some __str__s that belong to exceptions, so as you're printing an error you fail.

Comments (1)