]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Reindent example in docstring, which apparently trips up emacs' indentation 149/head
authorBen Darnell <ben@bendarnell.com>
Tue, 12 Oct 2010 00:24:11 +0000 (17:24 -0700)
committerBen Darnell <ben@bendarnell.com>
Tue, 12 Oct 2010 00:24:11 +0000 (17:24 -0700)
detection.

tornado/stack_context.py

index ae95e005cce46e6cea59daa959d7705ba74c61f9..0cada16ed0bfab275d0d7a0ee9d817627a2ea405 100644 (file)
@@ -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