diff --git a/sphinx/setup_command.py b/sphinx/setup_command.py index 2ef152d6d..86e84196f 100644 --- a/sphinx/setup_command.py +++ b/sphinx/setup_command.py @@ -81,6 +81,7 @@ class BuildDoc(Command): else: app.builder.build_update() except Exception, err: + from docutils.utils import SystemMessage if isinstance(err, SystemMessage): sys.stderr, darkred('reST markup error:') print >>sys.stderr, err.args[0].encode('ascii', 'backslashreplace')