Changeset 886307f


Ignore:
Timestamp:
Jul 28, 2009 3:42:17 PM (15 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
Children:
d9987ad
Parents:
9479343
Message:

better subprocess output containment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_control.py

    r9479343 r886307f  
    555555
    556556            try:
    557                 dnull = open("/dev/null", "r")
     557                dnull = open("/dev/null", "w")
    558558            except IOError:
    559559                self.log.debug("[ssh_cmd]: failed to open /dev/null " + \
     
    996996                    "Failed to open file in genviz")
    997997
     998        try:
     999            dnull = open('/dev/null', 'w')
     1000        except IOError:
     1001            service_error(service_error.internal,
     1002                    "Failed to open /dev/null in genviz")
     1003
    9981004        # Generate a dot/neato input file from the links, nodes and lans
    9991005        try:
     
    10161022        # Use dot to create a visualization
    10171023        dot = Popen([neato, '-Gstart=rand', '-Gepsilon=0.005', '-Gmaxiter=2000',
    1018                 '-Gpack=true', dotname], stdout=PIPE, close_fds=True)
     1024                '-Gpack=true', dotname], stdout=PIPE, stderr=dnull,
     1025                close_fds=True)
     1026        dnull.close()
    10191027
    10201028        # Translate dot to vis format
Note: See TracChangeset for help on using the changeset viewer.