Fixed string formatting in text_format.py to be Python2.6-compatible

In Python 2.6 the positional argument specifiers are apparently required
to be explicitly specified:
http://stackoverflow.com/questions/10054122/valueerror-zero-length-field-name-in-format-python
pull/1729/head
Adam Cozzette 9 years ago
parent d64a2d9941
commit b83af525db
  1. 4
      python/google/protobuf/text_format.py

@ -81,8 +81,8 @@ class ParseError(Error):
if message is not None and line is not None:
loc = str(line)
if column is not None:
loc += ':{}'.format(column)
message = '{} : {}'.format(loc, message)
loc += ':{0}'.format(column)
message = '{0} : {1}'.format(loc, message)
if message is not None:
super(ParseError, self).__init__(message)
else:

Loading…
Cancel
Save