Author: jacob
Date: 2009-12-16 17:47:30 -0600 (Wed, 16 Dec 2009)
New Revision: 11884
Modified:
django/trunk/django/core/management/commands/dumpdata.py
Log:
Fixed #12384: fixed a Python 2.4 incompatibility introduced in [11863].
Modified: django/trunk/django/core/management/commands/dumpdata.py
===================================================================
--- django/trunk/django/core/management/commands/dumpdata.py 2009-12-16
21:25:00 UTC (rev 11883)
+++ django/trunk/django/core/management/commands/dumpdata.py 2009-12-16
23:47:30 UTC (rev 11884)
@@ -137,10 +137,15 @@
changed = False
while model_dependencies:
model, deps = model_dependencies.pop()
- if all((d not in models or d in model_list) for d in deps):
- # If all of the models in the dependency list are either
already
- # on the final model list, or not on the original
serialization list,
- # then we've found another model with all it's dependencies
satisfied.
+
+ # If all of the models in the dependency list are either already
+ # on the final model list, or not on the original serialization
list,
+ # then we've found another model with all it's dependencies
satisfied.
+ found = True
+ for candidate in ((d not in models or d in model_list) for d in
deps):
+ if not candidate:
+ found = False
+ if found:
model_list.append(model)
changed = True
else:
@@ -152,4 +157,4 @@
)
model_dependencies = skipped
- return model_list
+ return model_list
\ No newline at end of file
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.