write_stderr() function is unnecessary

This commit is contained in:
David Baumgold
2014-03-19 14:24:57 -04:00
parent e9b0cc713a
commit 4fbfbf11ff
2 changed files with 3 additions and 11 deletions

View File

@@ -6,7 +6,7 @@ import sys
import argparse
from paver.easy import *
from .utils.cmd import django_cmd
from .utils.process import write_stderr, run_process, run_multi_processes
from .utils.process import run_process, run_multi_processes
DEFAULT_PORT = {"lms": 8000, "studio": 8001}
@@ -164,4 +164,4 @@ def check_settings(args):
sh("{import_cmd} | {shell_cmd}".format(import_cmd=import_cmd, shell_cmd=django_shell_cmd))
except:
write_stderr("Failed to import settings\n")
print("Failed to import settings", file=sys.stderr)

View File

@@ -9,14 +9,6 @@ import signal
import psutil
def write_stderr(message):
"""
Print a `message` str to stderr.
"""
sys.stderr.write(message)
sys.stderr.flush()
def kill_process(proc):
"""
Kill the process `proc` created with `subprocess`.
@@ -61,7 +53,7 @@ def run_multi_processes(cmd_list, out_log=None, err_log=None):
print("Processes ending")
except Exception as err:
write_stderr("Error running process {}\n".format(err))
print("Error running process {}".format(err), file=sys.stderr)
finally:
for pid in pids: