]> git.siccegge.de Git - forks/vmdebootstrap.git/commitdiff
Use simple subprocess call for default_arch to prevent early use of run_cmd causing...
authorNeil Williams <codehelp@debian.org>
Thu, 28 Aug 2014 17:53:32 +0000 (10:53 -0700)
committerNeil Williams <codehelp@debian.org>
Thu, 28 Aug 2014 17:53:32 +0000 (10:53 -0700)
vmdebootstrap

index 546742985f7ec6d936f8ddab8d258618a22ba1f5..89739c59c0839a2ef9f1b98c6ce3635a89ca17fe 100755 (executable)
@@ -20,7 +20,6 @@ import crypt
 import logging
 import os
 import re
-import time
 import shutil
 import subprocess
 import tempfile
@@ -33,9 +32,8 @@ __version__ = '0.3'
 class VmDebootstrap(cliapp.Application):
 
     def add_settings(self):
-        default_arch = self.runcmd(
-            ["dpkg", "--print-architecture"],
-            ignore_fail=False).strip()
+        default_arch = subprocess.check_output(
+                ["dpkg", "--print-architecture"]).strip()
 
         self.settings.boolean(['verbose'], 'report what is going on')
         self.settings.string(['image'], 'put created disk image in FILE',
@@ -319,6 +317,7 @@ class VmDebootstrap(cliapp.Application):
         self.runcmd(args)
         if self.settings['foreign']:
             # First copy the binfmt handler over
+            self.message('Setting up binfmt handler')
             shutil.copy(self.settings['foreign'], '%s/usr/bin/' % rootdir)
             # Next, run the package install scripts etc.
             self.message('Running debootstrap second stage')