Remove whole directory tree
        Reimplemented in project explorer widget

def remove_tree(self, dirname):
        """Remove whole directory tree
        Reimplemented in project explorer widget"""
        while osp.exists(dirname):
            try:
                shutil.rmtree(dirname, onerror=misc.onerror)
            except Exception as e:
                # This handles a Windows problem with shutil.rmtree.
                # See issue #8567.
                if type(e).__name__ == "OSError":
                    error_path = to_text_string(e.filename)
                    shutil.rmtree(error_path, ignore_errors=True)