Skip to content

Commit

Permalink
refactor: Remove removed ChromeOS branch "DEV"
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaVandaele committed Dec 8, 2023
1 parent 5e4421e commit 02145a0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ The tool currently supports the following ISOs:
- OpenSUSE (editions: "leap", "leap-micro", "jump")
- TrueNAS (editions: "scale")
- Tails
- ChromeOS (editions: "LTC", "LTR", "DEV", "STABLE")
- ChromeOS (editions: "ltc", "ltr", "stable")
- **Windows**
- Windows 11 (Multi-edition ISO, Any language)
- Windows 10 (Multi-edition ISO, Any language)
Expand Down
4 changes: 2 additions & 2 deletions config/config.toml.default
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ enabled = true
[OperatingSystems.Linux.ChromeOS]
enabled = true
# Available editions:
# "LTC", "LTR", "DEV", "STABLE"
editions = ["STABLE"]
# "ltc", "ltr", "stable"
editions = ["stable"]

# Windows
[OperatingSystems.Windows]
Expand Down
13 changes: 4 additions & 9 deletions modules/updaters/ChromeOS.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,20 @@ class ChromeOS(GenericUpdater):
"""

def __init__(self, folder_path: str, edition: str) -> None:
self.valid_editions = ["LTC", "LTR", "DEV", "STABLE"]
self.valid_editions = ["ltc", "ltr", "stable"]
self.edition = edition

file_path = os.path.join(folder_path, FILE_NAME)
super().__init__(file_path)

# Make the parameter case insensitive, and find back the correct case using valid_editions
self.edition = next(
valid_ed
for valid_ed in self.valid_editions
if valid_ed.lower() == self.edition.lower()
)

self.chromium_releases_info: list[dict] = requests.get(
f"{DOMAIN}/dl/edgedl/chromeos/recovery/cloudready_recovery2.json"
).json()

self.cur_edition_info: dict = next(
d for d in self.chromium_releases_info if d["channel"] == self.edition
d
for d in self.chromium_releases_info
if d["channel"].lower() == self.edition
)

@cache
Expand Down

0 comments on commit 02145a0

Please sign in to comment.