Note, this error only arises if both of the following conditions are true:
the user specifies an invalid value for pre, i.e. pre not in [None, '', 'a', 'b', 'rc']
the update repository actually contains a new pre-release
Although this constitutes a user error (not a bug), it would be highly inconvenient, so it's best to protect users by preventing this scenario altogether.
The
included[pre]
call inClient.check_for_updates()
will crash the updater if user specifies an invalidpre
key:https://github.com/dennisvang/tufup/blob/b0ae976200192dff8b921b9490196b7a333699d8/src/tufup/client.py#L180
Note, this error only arises if both of the following conditions are true:
pre
, i.e.pre not in [None, '', 'a', 'b', 'rc']
Although this constitutes a user error (not a bug), it would be highly inconvenient, so it's best to protect users by preventing this scenario altogether.