Skip to content

Commit

Permalink
Merge pull request #21 from Eeems/patch-4
Browse files Browse the repository at this point in the history
Don't error if BetaProgram= is missing
  • Loading branch information
Jayy001 authored Sep 22, 2023
2 parents 5aaa6c2 + 26bd2b6 commit d6f234e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/codexctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@ def do_status(args):
with ftp.file("/usr/share/remarkable/update.conf") as file:
version_contents = file.read().decode("utf-8")

beta = re.search("(?<=BetaProgram=).*", config_contents).group()
beta = re.search("(?<=BetaProgram=).*", config_contents)
prev = re.search("(?<=PreviousVersion=).*", config_contents).group()
current = re.search("(?<=REMARKABLE_RELEASE_VERSION=).*", version_contents).group()

print(
f'You are running {current} [{version_id}]{"[BETA]" if beta else ""}, previous version was {prev}'
f'You are running {current} [{version_id}]{"[BETA]" if beta is not None and beta.group() else ""}, previous version was {prev}'
)


Expand Down

0 comments on commit d6f234e

Please sign in to comment.