Ticket #11481: loaddata_patch_ver_2.diff
File loaddata_patch_ver_2.diff, 2.0 KB (added by , 15 years ago) |
---|
-
django/core/management/commands/loaddata.py
105 105 (fixture_name, format))) 106 106 transaction.rollback() 107 107 transaction.leave_transaction_management() 108 return108 sys.exit(1) 109 109 110 110 if os.path.isabs(fixture_name): 111 111 fixture_dirs = [fixture_name] … … 138 138 (fixture_name, humanize(fixture_dir))) 139 139 transaction.rollback() 140 140 transaction.leave_transaction_management() 141 return141 sys.exit(1) 142 142 else: 143 143 fixture_count += 1 144 144 objects_in_fixture = 0 … … 167 167 self.style.ERROR("Problem installing fixture '%s': %s\n" % 168 168 (full_path, ''.join(traceback.format_exception(sys.exc_type, 169 169 sys.exc_value, sys.exc_traceback))))) 170 return170 sys.exit(1) 171 171 fixture.close() 172 172 173 173 # If the fixture we loaded contains 0 objects, assume that an … … 178 178 (fixture_name))) 179 179 transaction.rollback() 180 180 transaction.leave_transaction_management() 181 return181 sys.exit(1) 182 182 183 183 except Exception, e: 184 184 if verbosity > 1: