Ticket #1543: management.diff

File management.diff, 1.2 KB (added by Nebojsa Djordjevic <nesh at studioquattro dot co dot yu>, 18 years ago)
  • store/django_no_magic/django/core/management.py

     
    319319    for sql_file in sql_files:
    320320        if os.path.exists(sql_file):
    321321            fp = open(sql_file)
    322             output.append(fp.read())
     322            output += fp.readlines()
    323323            fp.close()
    324324
    325325    return output
     
    451451                        for sql in initial_sql:
    452452                            cursor.execute(sql)
    453453                    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))
    456456                        transaction.rollback_unless_managed()
    457457                    else:
    458458                        transaction.commit_unless_managed()
Back to Top