mirror of
https://github.com/ansible/awx.git
synced 2026-03-20 18:37:39 -02:30
Cleanup stdout dump during 2.2 migration
postgres is adding extra newline/carriage return escapes to the stdout output. Here we'll use sed to fix those so they can be read correctly
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import uuid
|
import uuid
|
||||||
import os
|
import os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
from south.utils import datetime_utils as datetime
|
from south.utils import datetime_utils as datetime
|
||||||
from south.db import db
|
from south.db import db
|
||||||
@@ -20,6 +21,8 @@ class Migration(DataMigration):
|
|||||||
j.result_stdout_file = stdout_filename
|
j.result_stdout_file = stdout_filename
|
||||||
j.result_stdout_text = ""
|
j.result_stdout_text = ""
|
||||||
j.save()
|
j.save()
|
||||||
|
sed_command = subprocess.Popen(["sed", "-i", "-e", "s/\\\\r\\\\n/\\n/g", stdout_filename])
|
||||||
|
sed_command.wait()
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user