fix travis

This commit is contained in:
Michael Hudson-Doyle 2020-04-07 21:25:10 +12:00
parent b9999ddd47
commit be146972da
2 changed files with 3 additions and 2 deletions

View File

@ -18,7 +18,7 @@ for answers in examples/answers*.yaml; do
exit 1
fi
done
TTY=$(tty)
TTY=$(tty || true)
timeout --foreground 60 sh -c "LANG=C.UTF-8 python3 -m subiquity.cmd.tui --autoinstall examples/autoinstall.yaml \
--dry-run --machine-config examples/simple.json \
--kernel-cmdline 'autoinstall console=\"${TTY#/dev/}\"'"

View File

@ -188,7 +188,8 @@ class Subiquity(Application):
try:
our_tty = os.ttyname(0)
except OSError:
our_tty = "not a tty"
# This is a gross hack for testing in travis.
our_tty = "/dev/not a tty"
if not self.interactive() and our_tty != primary_tty:
print(
_("the installer running on {} will perform the "