diff options
author | Neil Williams <codehelp@debian.org> | 2015-01-04 12:12:35 +0000 |
---|---|---|
committer | Neil Williams <codehelp@debian.org> | 2015-01-04 12:12:35 +0000 |
commit | 48cd527760b1621dc68d7ad27b04c586532fe60f (patch) | |
tree | 898b63eb193316f5a751074796e3e9d133b31ea0 /vmdebootstrap | |
parent | ec2fdb1ee3e2f28b18213d20892bbd11c98d2bf9 (diff) | |
download | vmdebootstrap-48cd527760b1621dc68d7ad27b04c586532fe60f.tar.gz |
Allow builds without a tty
Closes: #747373
Patch from Nick Daly <nick.m.daly@gmail.com>
Diffstat (limited to 'vmdebootstrap')
-rwxr-xr-x | vmdebootstrap | 5 |
1 files changed, 4 insertions, 1 deletions
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 |