1
0
mirror of https://github.com/konpa/devicon.git synced 2025-08-16 03:24:13 +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

@@ -78,7 +78,7 @@ class SeleniumRunner:
def upload_icomoon(self):
"""
Upload the icomoon_test.json to icomoon.io.
Upload the icomoon.json to icomoon.io.
:raises TimeoutException: happens when elements are not found.
"""
print("Uploading JSON file...")
@@ -89,7 +89,6 @@ class SeleniumRunner:
)
import_btn.send_keys(self.icomoon_json_path)
except Exception as e:
print("hi")
self.close()
raise e
@@ -100,8 +99,8 @@ class SeleniumRunner:
confirm_btn.click()
except SeleniumTimeoutException as e:
print(e.stacktrace)
print("Cannot find the confirm button when uploading the icomoon_test.json",
"Ensure that the icomoon_test.json is in the correct format for Icomoon.io",
print("Cannot find the confirm button when uploading the icomoon.json",
"Ensure that the icomoon.json is in the correct format for Icomoon.io",
sep='\n')
self.close()

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

View File

@@ -0,0 +1 @@
This folder was taken from: https://github.com/mozilla/geckodriver/releases/tag/v0.27.0

Binary file not shown.