Beispiel #1
0
 def err(self):
     """Return error stream. Returns empty string if empty or doesn't exist.
        Returns (str) : error stream written to file
     """
     if os.path.exists(self.stderr.name):
         return read_file(self.stderr.name)
     return ""
Beispiel #2
0
 def action_get_output(self, data):
     """Get error stream, if the file exists.
     """
     outputfile = data.get("outputfile")
     if os.path.exists(outputfile):
         return read_file(outputfile)
     return ["%s does not exist.\n" % outputfile]
Beispiel #3
0
 def out(self):
     """Return output stream. Returns empty string if empty or doesn't exist.
        Returns (str) : output stream written to file
     """
     if os.path.exists(self.stdout.name):
         return read_file(self.stdout.name)
     return ""
Beispiel #4
0
 def action_get_error(self, data):
     """Get just output stream, if the file exists.
     """
     errorfile = data.get("outputfile")
     if os.path.exists(errorfile):
         return read_file(errorfile)
     return ["%s does not exist.\n" % errorfile]