diff --git a/rwx/fs/__init__.py b/rwx/fs/__init__.py index 205746d..0772a8d 100644 --- a/rwx/fs/__init__.py +++ b/rwx/fs/__init__.py @@ -139,11 +139,9 @@ def wipe(path: Path) -> None: :type path: Path """ try: - shutil.rmtree(path) - except NotADirectoryError: path.unlink(missing_ok=True) - except FileNotFoundError: - pass + except IsADirectoryError: + shutil.rmtree(path) def write(file_path: Path, text: str, charset: str = CHARSET) -> None: diff --git a/rwx/sw/freetube/artists.py b/rwx/sw/freetube/authors.py similarity index 84% rename from rwx/sw/freetube/artists.py rename to rwx/sw/freetube/authors.py index 0584296..7f108e7 100644 --- a/rwx/sw/freetube/artists.py +++ b/rwx/sw/freetube/authors.py @@ -1,4 +1,4 @@ -"""FreeTube artists.""" +"""FreeTube authors.""" from typing import TYPE_CHECKING @@ -8,8 +8,8 @@ if TYPE_CHECKING: from .playlists import Playlist -class Artist(Object): - """FreeTube artist.""" +class Author(Object): + """FreeTube author.""" def __init__(self, uid: str, name: str) -> None: """Set uid & name.