Skip to content

Commit

Permalink
#3217 bail out if the user specifies an unknown encoding
Browse files Browse the repository at this point in the history
the default configs only specify valid options like 'all'
  • Loading branch information
totaam committed Nov 12, 2021
1 parent 1e84235 commit e2c978c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xpra/scripts/config.py
Expand Up @@ -1423,6 +1423,10 @@ def fixup_encodings(options):
if "rgb32" not in encodings:
encodings.append("rgb32")
encodings = remove_dupes(encodings)
invalid = tuple(e.lstrip("-") for e in encodings if (e.lstrip("-") not in PREFERRED_ENCODING_ORDER))
if invalid:
from xpra.exit_codes import EXIT_UNSUPPORTED #pylint: disable=import-outside-toplevel
raise InitExit(EXIT_UNSUPPORTED, "invalid encodings specified: %s" % csv(invalid))
#now we have a list of encodings, but some of them may be prefixed with "-"
for rm in tuple(e for e in encodings if e.startswith("-")):
while True:
Expand Down

0 comments on commit e2c978c

Please sign in to comment.