All pastes #1508904 Raw Edit

Bart Thate

public text v1 · immutable
#1508904 ·published 2009-07-27 14:27 UTC
rendered paste body
diff -r 107edb786ff7 gozernest/SQLAlchemy-0.5.4p2-py2.5.egg/sqlalchemy/orm/mapper.py
--- a/gozernest/SQLAlchemy-0.5.4p2-py2.5.egg/sqlalchemy/orm/mapper.py	Sun Jul 26 20:52:38 2009 +0200
+++ b/gozernest/SQLAlchemy-0.5.4p2-py2.5.egg/sqlalchemy/orm/mapper.py	Mon Jul 27 16:20:48 2009 +0200
@@ -640,7 +640,7 @@
                     # used within a ForeignKey, something that is possible
                     # when using the declarative layer
                     self._post_configure_properties()
-                    return
+                    return self
                 _already_compiling = True
                 try:
 
@@ -660,13 +660,14 @@
                     _new_mappers = False
                     return self
                 finally:
-                    _already_compiling = False
+                    pass
             except:
                 import sys
                 exc = sys.exc_info()[1]
                 self._compile_failed = exc
                 raise
         finally:
+            already_compiling = False
             _COMPILE_MUTEX.release()
 
     def _post_configure_properties(self):
bart@done:~/gozerbot/0.9.1/work/alchemy$