Ticket #1543: management.diff
File management.diff, 1.2 KB (added by , 19 years ago) |
---|
-
store/django_no_magic/django/core/management.py
319 319 for sql_file in sql_files: 320 320 if os.path.exists(sql_file): 321 321 fp = open(sql_file) 322 output .append(fp.read())322 output += fp.readlines() 323 323 fp.close() 324 324 325 325 return output … … 451 451 for sql in initial_sql: 452 452 cursor.execute(sql) 453 453 except Exception, e: 454 sys.stderr.write("Failed to install initial SQL data for %s model: %s" % \455 (model._meta.object_name, e))454 sys.stderr.write("Failed to install initial SQL data for %s model: \n%s\n%s\n" % \ 455 (model._meta.object_name, sql, e)) 456 456 transaction.rollback_unless_managed() 457 457 else: 458 458 transaction.commit_unless_managed()