diff options
Diffstat (limited to 'sphinx/setup_command.py')
-rw-r--r-- | sphinx/setup_command.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sphinx/setup_command.py b/sphinx/setup_command.py index 7999bf591..9a863611b 100644 --- a/sphinx/setup_command.py +++ b/sphinx/setup_command.py @@ -11,6 +11,7 @@ :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ +from __future__ import print_function import sys import os @@ -158,12 +159,12 @@ class BuildDoc(Command): try: app.build(force_all=self.all_files) - except Exception, err: + except Exception as err: from docutils.utils import SystemMessage if isinstance(err, SystemMessage): - print >>sys.stderr, darkred('reST markup error:') - print >>sys.stderr, err.args[0].encode('ascii', - 'backslashreplace') + print(darkred('reST markup error:'), file=sys.stderr) + print(err.args[0].encode('ascii', + 'backslashreplace'), file=sys.stderr) else: raise |