163 elif (not self.error) and (status != 0): |
163 elif (not self.error) and (status != 0): |
164 return "dtrx returned error code %s" % (status,) |
164 return "dtrx returned error code %s" % (status,) |
165 return None |
165 return None |
166 |
166 |
167 def grep_output(self, output): |
167 def grep_output(self, output): |
168 if self.grep and (not re.search(self.grep, output, re.MULTILINE)): |
168 if self.grep and (not re.search(self.grep.replace(' ', '\\s+'), |
|
169 output, re.MULTILINE)): |
169 return "output did not match %s" % (self.grep) |
170 return "output did not match %s" % (self.grep) |
170 elif self.antigrep and re.search(self.antigrep, output, re.MULTILINE): |
171 elif self.antigrep and re.search(self.antigrep.replace(' ', '\\s+'), |
|
172 output, re.MULTILINE): |
171 return "output matched antigrep %s" % (self.antigrep) |
173 return "output matched antigrep %s" % (self.antigrep) |
172 return None |
174 return None |
173 |
175 |
174 def check_output(self, output): |
176 def check_output(self, output): |
175 if ((self.output is not None) and |
177 if ((self.output is not None) and |