File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,13 @@ def setup_project():
157157 logging .warn ('Could not patch modules whitelist. '
158158 'The compiler and parser modules will not work and '
159159 'SSL support is disabled.' )
160+ # In SDK 1.6.4, the datastore doesn't save automatically on exit.
161+ # Register a handler to make sure we save. This is important on
162+ # manage.py commands other than 'runserver'. Note that with runserver,
163+ # the datastore is flushed twice. This should be acceptable.
164+ import atexit
165+ if hasattr (dev_appserver , 'TearDownStubs' ):
166+ atexit .register (dev_appserver .TearDownStubs )
160167 elif not on_production_server :
161168 try :
162169 # Restore the real subprocess module
@@ -189,10 +196,3 @@ def setup_project():
189196 sys .path .remove (path )
190197 sys .path = extra_paths + sys .path
191198
192- # In SDK 1.6.4, the datastore doesn't save automatically on exit.
193- # Register a handler to make sure we save. This is important on
194- # manage.py commands other than 'runserver'. Note that with runserver,
195- # the datastore is flushed twice. This should be acceptable.
196- import atexit
197- if hasattr (dev_appserver , 'TearDownStubs' ):
198- atexit .register (dev_appserver .TearDownStubs )
You can’t perform that action at this time.
0 commit comments