def start_supervisord(self,secureops="secureops"):
        env = dict(os.environ)
        try:
            del env['DJANGO_SETTINGS_MODULE']
        except __HOLE__:
            pass

        username = "opus"+self.projectname
        # Start it up
        log.info("Starting up supervisord for the project")
        proc = subprocess.Popen([secureops, '-s',
            username, self.projectdir, '-S'],
                stdout=subprocess.PIPE,
                stderr=subprocess.STDOUT,
                env=env,
                close_fds=True,
                )
        output = proc.communicate()[0]
        ret = proc.wait()
        if ret:
            raise DeploymentException("Failed to start supervisord. Ret:{0}. Output:{1}".format(ret, output))
        log.debug("Secure ops finished. Ret: {0}".format(ret))
dataset/ETHPy150Open bmbouter/Opus/opus/lib/deployer/__init__.py/ProjectDeployer.start_supervisord