subiquity/subiquitycore
Maciej Borzecki 5d77d71499 subiquitycore: allow overriding input/output when creating screens
The interaction with snap-recovery-chooser happens over stdin/stdout. The early
setup code in console-conf will attempt to restore sys.stdin/sys.stdout and hook
them up to the current tty.

The patch allows passing input/output streams explicitly as parameters to the
constructors.

Also, default to sys.stdin/sys.stdout and pass both streams explicitly when
constructing urwid.raw_display.Screen(), to workaround the bug in their
constructor. THe constructor is defined as follows:

    class Screen(BaseScreen, RealTerminal):
        def __init__(self, input=sys.stdin, output=sys.stdout):

What means, that even if we override sys.stdout/sys.stdin globally in our setup
code, this will have no effect as `input` and `output` already got their values.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-03-24 13:32:52 +01:00
..
controllers fix enabling dhcp on a virtual interface 2020-03-20 09:17:29 +13:00
models have apply_config task exit as soon as all dhcp NICs have an address 2019-12-13 10:04:31 +13:00
testing support for editing existing partitions 2019-05-30 15:10:54 +12:00
tests Fix writing of netplan configs 2018-06-07 11:46:34 -04:00
ui fix deleting virtual network devices 2020-03-20 09:18:25 +13:00
__init__.py pyflakes3 fixes for subiquitycore/__init__.py 2018-05-24 16:59:31 -05:00
async_helpers.py Add SingleInstanceTask.wait 2019-12-20 11:00:46 +13:00
context.py add a way to change the default level of a context's children 2019-12-20 09:47:38 +13:00
controller.py use the asyncio loop object rather than the urwid loop almost everywhere 2019-12-20 12:04:38 +13:00
core.py subiquitycore: allow overriding input/output when creating screens 2020-03-24 13:32:52 +01:00
file_util.py Fix writing of netplan configs 2018-06-07 11:46:34 -04:00
i18n.py Allow starting subiquity/console-conf without translations. 2019-08-07 12:40:10 +01:00
log.py create an INFO level log file too, unconditionally include it in error reports 2019-12-12 21:49:44 +13:00
lsb_release.py tox: Support running tests and flake8 in tox. 2018-06-05 17:59:46 -04:00
netplan.py a bit too much effort making one particular log statement look nice 2019-09-09 15:32:49 +12:00
prober.py push debug_flag block probe crashing into Prober 2019-12-16 23:15:48 +13:00
signals.py a bit too much effort making one particular log statement look nice 2019-09-09 15:32:49 +12:00
utils.py asyncioify run_command_in_foreground 2019-12-15 08:53:36 +13:00
view.py implement local documentation 2019-10-02 10:51:34 +13:00