From b83af525db15954ebcfc103b4c6c2f08d68fb10e Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Thu, 30 Jun 2016 10:13:53 -0700 Subject: 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 --- python/google/protobuf/text_format.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/google/protobuf/text_format.py b/python/google/protobuf/text_format.py index c4b23c37..06b79d77 100755 --- a/python/google/protobuf/text_format.py +++ b/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: -- cgit v1.2.3