Skip to content

Commit bbedf9f

Browse files
committed
chore: we now reference 'chrome' throughout, rather than 'chromium'
1 parent 877d3c4 commit bbedf9f

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

weduc_timetable_extractor/_config_management.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ def get_ics_folder_path(throw_if_absent=False):
6363
return get_config_option("ical", "output_folder_path", throw_if_absent)
6464

6565

66-
def get_chromium_path():
67-
chromium_path = get_config_option(WEDUC_SECTION_NAME, "chromium_path")
66+
def get_chrome_path():
67+
chrome_path = get_config_option(WEDUC_SECTION_NAME, "chrome_path")
6868

69-
if chromium_path != None:
70-
return chromium_path
69+
if chrome_path != None:
70+
return chrome_path
7171

7272
os_map = {
7373
"Windows": r"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe",
@@ -85,9 +85,9 @@ def validate_config_ini_path(config_ini_file_path):
8585
)
8686

8787

88-
def validate_chromium_path(chromium_path):
89-
if not Path(chromium_path).is_file():
90-
sys.exit(f"Error: unable to find a browser at path '{chromium_path}'")
88+
def validate_chrome_path(chrome_path):
89+
if not Path(chrome_path).is_file():
90+
sys.exit(f"Error: unable to find a browser at path '{chrome_path}'")
9191

9292

9393
def get_student_configs():

weduc_timetable_extractor/weduc_interaction/launch_browser_and_log_in.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from weduc_timetable_extractor._config_management import (
2-
get_chromium_path,
3-
validate_chromium_path,
2+
get_chrome_path,
3+
validate_chrome_path,
44
)
55

66
from ._login_to_weduc import _login_to_weduc
@@ -9,11 +9,11 @@
99
def launch_browser_and_log_in(weduc_credentials, use_headless, p):
1010
print("Launching browser ...")
1111

12-
chromium_path = get_chromium_path()
13-
validate_chromium_path(chromium_path)
14-
print("Using browser located at:", chromium_path)
12+
chrome_path = get_chrome_path()
13+
validate_chrome_path(chrome_path)
14+
print("Using browser located at:", chrome_path)
1515

16-
browser = p.chromium.launch(executable_path=chromium_path, headless=use_headless)
16+
browser = p.chromium.launch(executable_path=chrome_path, headless=use_headless)
1717
page = browser.new_page()
1818

1919
page.goto("https://app.weduc.co.uk/")

0 commit comments

Comments
 (0)