diff --git a/tests/embedded_server/openssh.py b/tests/embedded_server/openssh.py index c8e35f48..adeabb28 100644 --- a/tests/embedded_server/openssh.py +++ b/tests/embedded_server/openssh.py @@ -86,12 +86,14 @@ def start_server(self): logger.debug("Starting server with %s" % (" ".join(cmd),)) self.server_proc = Popen(cmd) try: - self.server_proc.wait(.1) + self.server_proc.wait(2) except TimeoutExpired: pass else: - logger.error(self.server_proc.stdout.read()) - logger.error(self.server_proc.stderr.read()) + if self.server_proc.stdout is not None: + logger.error(self.server_proc.stdout.read()) + if self.server_proc.stderr is not None: + logger.error(self.server_proc.stderr.read()) raise Exception("Server could not start") def stop(self):