Lines Matching refs:self
50 def __init__(self, status, stdout, stderr):
51 self.status = status
52 self.stdout = stdout
53 self.stderr = stderr
65 def __init__(self, *args, **kwargs):
66 super(ProcessHelper, self).__init__(*args, **kwargs)
68 def _terminate_nicely(self, timeout=5):
70 self.kill()
72 if self.returncode is not None:
73 return self.returncode
76 self.terminate()
77 status = self.wait()
82 def __enter__(self):
83 return self
85 def __exit__(self, exc_type, exc_value, traceback):
86 if self.returncode is None:
87 self._terminate_nicely()
89 def call(self, timeout=0):
90 self._timeout = False
92 self._timeout = True
93 self._terminate_nicely()
100 stdout, stderr = self.communicate()
101 status = self.wait()
105 if self._timeout:
106 self._terminate_nicely()
107 raise CallTimeoutException(self.returncode, stdout, stderr)
142 def __init__(self, names=(), rex=()):
143 self.rules = [ FileIgnoreList.simple(n) for n in names ] + \
146 def __contains__(self, name):
147 for rule in self.rules:
153 # Run internal self tests to ensure that the helpers are working