1
0
mirror of https://github.com/konpa/devicon.git synced 2025-08-23 14:43:56 +02:00

Added __pycache__ to gitignore. Documented geckodriver. Invalid path now throws error

This commit is contained in:
Thomas Bui
2020-09-02 09:29:39 -07:00
parent 83378fa698
commit 33b07225bf
9 changed files with 13 additions and 132 deletions

View File

@@ -56,9 +56,8 @@ def get_svgs_paths(new_icons: List[dict], icons_folder_path: str) -> List[str]:
for icon_info in new_icons:
folder_path = Path(icons_folder_path, icon_info['name'])
if not (folder_path.exists() and folder_path.is_dir()):
print(f"Invalid path. This is not a directory: {folder_path}\nSkipping entry...")
continue
if not folder_path.is_dir():
raise ValueError(f"Invalid path. This is not a directory: {folder_path}.")
try:
aliases = icon_info["aliases"]
@@ -74,6 +73,8 @@ def get_svgs_paths(new_icons: List[dict], icons_folder_path: str) -> List[str]:
if path.exists():
file_paths.append(str(path))
else:
raise ValueError(f"This path doesn't exist: {path}")
return file_paths