reactor.connectTCP(host, port, factory)
return factory.deferred
+class ChildDidNotStartError(Exception):
+ pass
+
class SystemFramework(pollmixin.PollMixin):
numnodes = 5
# the twistd process ends normally (with rc=0) if the child
# is successfully launched. It ends abnormally (with rc!=0)
# if the child cannot be launched.
- raise RuntimeError("process ended while waiting for startup")
+ raise ChildDidNotStartError("process ended while waiting for startup")
return os.path.exists(furl_file)
d = self.poll(_check, 0.1)
# once it exists, wait a moment before we read from it, just in case
d.addCallback(lambda res: u.upload(upload.FileName(files[name], convergence="check-memory convergence string")))
d.addCallback(lambda results: results.uri)
else:
- raise RuntimeError("unknown mode=%s" % self.mode)
+ raise ValueError("unknown mode=%s" % self.mode)
def _complete(uri):
uris[name] = uri
print "uploaded %s" % name
def stopService(self):
service.MultiService.stopService(self)
def when_tub_ready(self):
- raise RuntimeError("NoNetworkClient has no Tub")
+ raise NotImplementedError("NoNetworkClient has no Tub")
def init_control(self):
pass
def init_helper(self):