From 48cd527760b1621dc68d7ad27b04c586532fe60f Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Sun, 4 Jan 2015 12:12:35 +0000 Subject: [PATCH] Allow builds without a tty Closes: #747373 Patch from Nick Daly --- vmdebootstrap | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vmdebootstrap b/vmdebootstrap index 7ac8807..9247e6b 100755 --- a/vmdebootstrap +++ b/vmdebootstrap @@ -743,7 +743,10 @@ append initrd=%(initrd)s root=UUID=%(uuid)s ro %(kserial)s self.message('Running customize script %s' % script) logging.info("rootdir=%s image=%s", rootdir, self.settings['image']) with open('/dev/tty', 'w') as tty: - cliapp.runcmd([script, rootdir, self.settings['image']], stdout=tty, stderr=tty) + try: + cliapp.runcmd([script, rootdir, self.settings['image']], stdout=tty, stderr=tty) + except IOError as e: + subprocess.call([script, rootdir, self.settings['image']]) def create_tarball(self, rootdir): # Create a tarball of the disk's contents -- 2.39.2