def delete_user(self, secureops="secureops"):
        log.info("Deleting user for project %s", self.projectname)

        # userdel will fail on some systems if any processes are still running
        # by the user. Here we wait a maximum of 30 seconds to make sure all
        # processes have ended. A return from pgrep will return 0 if a process
        # matched, 1 if no processes match, 2 if there is an error (including
        # user doesn't exist)
        tries = 0
        while subprocess.call(["pgrep", "-u", "opus"+self.projectname]) == 0:
            if not self.apache_restarted:
                # Wasn't restarted because the config file didn't exist. But
                # somehow last time apache may not have been restarted properly
                # since some processes are still running. Restart it now.
                self._restart_apache(secureops)
            if tries >= 6:
                log.warning("User still has processes running after 30 seconds!")
                # I'll take care of this *cracks knuckles*
                self.kill_processes(secureops)
                break
            log.debug("Was about to delete user, but it still has processes running! Waiting 5 seconds")
            tries += 1
            time.sleep(5)

        proc = subprocess.Popen([secureops, '-d', "opus"+self.projectname],
                stdout=subprocess.PIPE,
                stderr=subprocess.STDOUT)
        output = proc.communicate()[0]
        ret = proc.wait()
        if ret not in (0, 6):
            # ignore return code 6: user doesn't exist, to make this
            # idempotent.
            raise DeploymentException("userdel failed: {0}".format(output))
        log.debug("User removed")
Getter for kernel bandwidth, H
dataset/ETHPy150Open bmbouter/Opus/opus/lib/deployer/__init__.py/ProjectUndeployer.delete_user--crossover with--dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/sandbox/nonparametric/kernels.py/NdKernel.getH