add fallback for utf option

This commit is contained in:
Evgenii Alekseev 2022-03-20 03:16:33 +03:00
parent 6ee1c8ef5a
commit 1388df9a7e
2 changed files with 7 additions and 1 deletions

View File

@ -84,6 +84,12 @@ Type will be read from several ways:
* Otherwise, it will look for type from section name removing architecture name. * Otherwise, it will look for type from section name removing architecture name.
* And finally, it will use section name as type. * And finally, it will use section name as type.
### `console` type
Section name must be either `console` (plus optional architecture name, e.g. `console:x86_64`) or random name with `type` set.
* `use_utf` - use utf8 symbols in output if set and ascii otherwise, boolean, optional, default `yes`.
### `email` type ### `email` type
Section name must be either `email` (plus optional architecture name, e.g. `email:x86_64`) or random name with `type` set. Section name must be either `email` (plus optional architecture name, e.g. `email:x86_64`) or random name with `type` set.

View File

@ -40,7 +40,7 @@ class Console(Report):
:param section: settings section name :param section: settings section name
""" """
Report.__init__(self, architecture, configuration) Report.__init__(self, architecture, configuration)
self.use_utf = configuration.getboolean(section, "use_utf") self.use_utf = configuration.getboolean(section, "use_utf", fallback=True)
def generate(self, packages: Iterable[Package], result: Result) -> None: def generate(self, packages: Iterable[Package], result: Result) -> None:
""" """