From: Ben Darnell Date: Tue, 12 Oct 2010 00:24:11 +0000 (-0700) Subject: Reindent example in docstring, which apparently trips up emacs' indentation X-Git-Tag: v1.2.0~105 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F149%2Fhead;p=thirdparty%2Ftornado.git Reindent example in docstring, which apparently trips up emacs' indentation detection. --- diff --git a/tornado/stack_context.py b/tornado/stack_context.py index ae95e005c..0cada16ed 100644 --- a/tornado/stack_context.py +++ b/tornado/stack_context.py @@ -30,20 +30,20 @@ that transfer control from one context to another (e.g. AsyncHTTPClient itself, IOLoop, thread pools, etc). Example usage: - @contextlib.contextmanager - def die_on_error(): - try: - yield - except: - logging.error("exception in asynchronous operation", exc_info=True) - sys.exit(1) + @contextlib.contextmanager + def die_on_error(): + try: + yield + except: + logging.error("exception in asynchronous operation",exc_info=True) + sys.exit(1) - with StackContext(die_on_error): - # Any exception thrown here *or in callback and its desendents* - # will cause the process to exit instead of spinning endlessly - # in the ioloop. - http_client.fetch(url, callback) - ioloop.start() + with StackContext(die_on_error): + # Any exception thrown here *or in callback and its desendents* + # will cause the process to exit instead of spinning endlessly + # in the ioloop. + http_client.fetch(url, callback) + ioloop.start() ''' from __future__ import with_statement