From ce2185ce279664e54ba22b14663091abc5a3a8f2 Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Sun, 19 Jan 2014 14:17:10 +0400 Subject: Modernize the code now that Python 2.5 is no longer supported - Use print function instead of print statement; - Use new exception handling; - Use in operator instead of has_key(); - Do not use tuple arguments in functions; - Other miscellaneous improvements. This is based on output of `futurize --stage1`, with some manual corrections. --- sphinx/builders/text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sphinx/builders/text.py') diff --git a/sphinx/builders/text.py b/sphinx/builders/text.py index f09ad6541..b0704def3 100644 --- a/sphinx/builders/text.py +++ b/sphinx/builders/text.py @@ -65,7 +65,7 @@ class TextBuilder(Builder): f.write(self.writer.output) finally: f.close() - except (IOError, OSError), err: + except (IOError, OSError) as err: self.warn("error writing file %s: %s" % (outfilename, err)) def finish(self): -- cgit v1.2.1