From be146972da8343b4cd35b88809da2691ee171b3a Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Tue, 7 Apr 2020 21:25:10 +1200 Subject: [PATCH] fix travis --- scripts/runtests.sh | 2 +- subiquity/core.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/runtests.sh b/scripts/runtests.sh index 3d3ce923..a3f5cfa5 100755 --- a/scripts/runtests.sh +++ b/scripts/runtests.sh @@ -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/}\"'" diff --git a/subiquity/core.py b/subiquity/core.py index 783237ad..9e99f2fb 100644 --- a/subiquity/core.py +++ b/subiquity/core.py @@ -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 "