From: Serge S. Koval Date: Sat, 13 Apr 2013 20:12:37 +0000 (+0300) Subject: Comparison fix X-Git-Tag: v3.1.0~121^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd7286646909501376c9a205bed28cdf610bcbe3;p=thirdparty%2Ftornado.git Comparison fix --- diff --git a/tornado/stack_context.py b/tornado/stack_context.py index 7c2dea98e..7b4839a1b 100644 --- a/tornado/stack_context.py +++ b/tornado/stack_context.py @@ -146,7 +146,7 @@ class StackContext(object): # Note that this check comes after restoring _state.context # so that if it fails things are left in a (relatively) # consistent state. - if final_contexts != self.new_contexts: + if final_contexts is not self.new_contexts: raise StackContextInconsistentError( 'stack_context inconsistency (may be caused by yield ' 'within a "with StackContext" block)') @@ -185,7 +185,7 @@ class ExceptionStackContext(object): final_contexts = _state.contexts _state.contexts = self.old_contexts - if final_contexts != self.new_contexts: + if final_contexts is not self.new_contexts: raise StackContextInconsistentError( 'stack_context inconsistency (may be caused by yield ' 'within a "with StackContext" block)')