]> git.siccegge.de Git - forks/vmdebootstrap.git/commitdiff
Allow builds without a tty
authorNeil Williams <codehelp@debian.org>
Sun, 4 Jan 2015 12:12:35 +0000 (12:12 +0000)
committerNeil Williams <codehelp@debian.org>
Sun, 4 Jan 2015 12:12:35 +0000 (12:12 +0000)
Closes: #747373
Patch from Nick Daly <nick.m.daly@gmail.com>

vmdebootstrap

index 7ac88071505d656a8077945c85d416cf4bcc28b7..9247e6b9947545f1aca235a0908fc7d040b80e77 100755 (executable)
@@ -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