Ticket #18990: 18990.patch
File 18990.patch, 1.5 KB (added by , 12 years ago) |
---|
-
django/core/management/commands/loaddata.py
104 104 try: 105 105 with connection.constraint_checks_disabled(): 106 106 for fixture_label in fixture_labels: 107 fixture_file_found = 0 107 108 parts = fixture_label.split('.') 108 109 109 110 if len(parts) > 1 and parts[-1] in compression_types: … … 160 161 open_method = compression_types[compression_format] 161 162 try: 162 163 fixture = open_method(full_path, 'r') 164 fixture_file_found = 1 163 165 except IOError: 164 166 if verbosity >= 2: 165 167 self.stdout.write("No %s fixture '%s' in %s.\n" % \ … … 216 218 transaction.leave_transaction_management(using=using) 217 219 return 218 220 221 if not fixture_file_found: 222 self.stderr.write("Any fixture file couldn't be found for '%s'" % 223 fixture_label) 224 219 225 # Since we disabled constraint checks, we must manually check for 220 226 # any invalid keys that might have been added 221 227 table_names = [model._meta.db_table for model in models]