Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #12384: fixed a Python 2.4 incompatibility introduced in [11863].

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11884 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit c0c6e7d1031b5e8c8824ec5068ac46e48c2f67e4 1 parent b38e678
Jacob Kaplan-Moss authored December 16, 2009
15  django/core/management/commands/dumpdata.py
@@ -137,10 +137,15 @@ def sort_dependencies(app_list):
137 137
         changed = False
138 138
         while model_dependencies:
139 139
             model, deps = model_dependencies.pop()
140  
-            if all((d not in models or d in model_list) for d in deps):
141  
-                # If all of the models in the dependency list are either already
142  
-                # on the final model list, or not on the original serialization list,
143  
-                # then we've found another model with all it's dependencies satisfied.
  140
+            
  141
+            # If all of the models in the dependency list are either already
  142
+            # on the final model list, or not on the original serialization list,
  143
+            # then we've found another model with all it's dependencies satisfied.
  144
+            found = True
  145
+            for candidate in ((d not in models or d in model_list) for d in deps):
  146
+                if not candidate:
  147
+                    found = False
  148
+            if found:
144 149
                 model_list.append(model)
145 150
                 changed = True
146 151
             else:
@@ -152,4 +157,4 @@ def sort_dependencies(app_list):
152 157
             )
153 158
         model_dependencies = skipped
154 159
 
155  
-    return model_list
  160
+    return model_list

0 notes on commit c0c6e7d

Please sign in to comment.
Something went wrong with that request. Please try again.