mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03: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:
parent
4ce2300d27
commit
7080996670
@ -1,6 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import uuid
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from south.utils import datetime_utils as datetime
|
||||
from south.db import db
|
||||
@ -20,6 +21,8 @@ class Migration(DataMigration):
|
||||
j.result_stdout_file = stdout_filename
|
||||
j.result_stdout_text = ""
|
||||
j.save()
|
||||
sed_command = subprocess.Popen(["sed", "-i", "-e", "s/\\\\r\\\\n/\\n/g", stdout_filename])
|
||||
sed_command.wait()
|
||||
|
||||
def backwards(self, orm):
|
||||
pass
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user