def clear_staging(self, force=False):
        """
        rm -rf the staging area. Fail if the staging area doesn't exist.
        """
        self.log("Attempting rm -rf staging "
                 "area. ({0})...".format(self.STAGE_DIR))
        if os.path.exists(self.STAGE_DIR) or force:
            try:
                shutil.rmtree(self.STAGE_DIR)
            except __HOLE__, e:
                if e.errno == 2:
                    self.log("Staging was not present.",
                             log_level='LOG_WARNING')
                else:
                    raise
            self.log("Staging area cleared")
        else:
            if not force:
                raise BuildError("The DNS build scripts tried to remove the "
                                 "staging area but the staging area didn't "
                                 "exist.")
dataset/ETHPy150Open mozilla/inventory/mozdns/mozbind/builder.py/DNSBuilder.clear_staging