diff --git a/dankware/datetime.py b/dankware/datetime.py index ac248f0..d93ca6f 100644 --- a/dankware/datetime.py +++ b/dankware/datetime.py @@ -63,7 +63,7 @@ def get_duration(then: datetime, now: datetime = None, interval: str = "default" if seconds < 31536000: months = int(seconds / 2592000) - if mini: return f"{months}m" + if mini: return f"{months}mo" return f"{months} month{'s' if months > 1 else ''}" years = int(seconds / 31536000) diff --git a/dankware/requests.py b/dankware/requests.py index d21564c..67991fc 100644 --- a/dankware/requests.py +++ b/dankware/requests.py @@ -19,7 +19,9 @@ def github_downloads(user_repo: str) -> tuple[str]: response = requests.get(f"https://api.github.com/repos/{user_repo}/releases/latest", headers = {"User-Agent": "dankware"}, timeout=3).json() - return tuple(data["browser_download_url"] for data in response["assets"]) + if response.status_code == 200: + return tuple(data["browser_download_url"] for data in response["assets"]) + raise RuntimeError(f"Failed to get latest release from github: [{response.status_code}] {response.reason}") def github_file_selector(user_repo: str, filter_mode: str, filter_iterable: list[str] | tuple[str]) -> tuple[str]: diff --git a/setup.py b/setup.py index dd1d32b..dda24ef 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ license = "MIT", name = "dankware", - version = "3.6", + version = "3.6.1", author = "SirDank", author_email = "SirDankenstein@protonmail.com", @@ -47,9 +47,10 @@ package_dir = {"": "."}, packages = find_packages(where = "."), + extras_require={'extras': ['pillow']}, install_requires = [ "rich", "colorama", "requests", - ], + ] )