From c61ddc600ad08c0b4cc5ccd6617287d186b7f207 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 12 Apr 2012 10:43:19 -0400 Subject: [PATCH] Add positional arguments to format strings for Python 2.6 compatibility. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit For 2.7 and later, the positional arguments can be omitted, but Richard Höchenberger (and others?) wants to run pycomedi on 2.6. --- pycomedi/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pycomedi/__init__.py b/pycomedi/__init__.py index cd118e1..4b12075 100644 --- a/pycomedi/__init__.py +++ b/pycomedi/__init__.py @@ -42,8 +42,8 @@ class PyComediError (Exception): self.comedi_msg = comedi_msg self.error_msg = error_msg if error_msg: - msg = '{} ({}): {} ({})'.format( + msg = '{0} ({1}): {2} ({3})'.format( function_name, error_msg, comedi_msg, ret) else: - msg = '{}: {} ({})'.format(function_name, comedi_msg, ret) + msg = '{0}: {1} ({2})'.format(function_name, comedi_msg, ret) super(PyComediError, self).__init__(msg) -- 2.26.2