diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2010-10-28 12:16:04 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2010-10-28 12:16:04 +0000 |
| commit | c120794b9d1efa20732ec3bf389e7487a7408e8b (patch) | |
| tree | f45844a3e85859450e57f1d4d5f787bb7e3b31b7 | |
| parent | 4890ff129200f3cbb86027a173ff9ba4cedc11c4 (diff) | |
[1.2.X] Fixed the ugly spacing of 'BEGIN;' and 'COMMIT;' in the output of the sql/sqlall commands. They're no longer smooshed with the rest of the SQL.
Backport of r13993 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14384 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/management/base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/management/base.py b/django/core/management/base.py index 3e20e2db29..282fbd7fb4 100644 --- a/django/core/management/base.py +++ b/django/core/management/base.py @@ -225,10 +225,10 @@ class BaseCommand(object): from django.db import connections, DEFAULT_DB_ALIAS connection = connections[options.get('database', DEFAULT_DB_ALIAS)] if connection.ops.start_transaction_sql(): - self.stdout.write(self.style.SQL_KEYWORD(connection.ops.start_transaction_sql())) + self.stdout.write(self.style.SQL_KEYWORD(connection.ops.start_transaction_sql()) + '\n') self.stdout.write(output) if self.output_transaction: - self.stdout.write(self.style.SQL_KEYWORD("COMMIT;") + '\n') + self.stdout.write('\n' + self.style.SQL_KEYWORD("COMMIT;") + '\n') except CommandError, e: self.stderr.write(smart_str(self.style.ERROR('Error: %s\n' % e))) sys.exit(1) |
