summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2016-01-17 14:29:11 +0000
committerNeil Williams <codehelp@debian.org>2016-01-17 14:29:11 +0000
commit81d03ab87cfabb5b9d8c7ae1a19bb7f3ff2338ac (patch)
tree009f5e6e526cc5606377940e1a859be0d559a2f1
parent57f49749e623b4b052dad01180d49cd1b8006558 (diff)
downloadvmdebootstrap-81d03ab87cfabb5b9d8c7ae1a19bb7f3ff2338ac.tar.gz
runtime python3 changes
-rwxr-xr-xbin/vmdebootstrap2
-rw-r--r--vmdebootstrap/filesystem.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/bin/vmdebootstrap b/bin/vmdebootstrap
index dc76693..169da37 100755
--- a/bin/vmdebootstrap
+++ b/bin/vmdebootstrap
@@ -63,7 +63,7 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth
def add_settings(self):
# deliberately long lines for clarity.
- default_arch = subprocess.check_output(["dpkg", "--print-architecture"]).strip()
+ default_arch = subprocess.check_output(["dpkg", "--print-architecture"]).decode('utf-8').strip()
self.settings.boolean(['verbose'], 'report what is going on')
self.settings.string(['image'], 'put created disk image in FILE', metavar='FILE')
diff --git a/vmdebootstrap/filesystem.py b/vmdebootstrap/filesystem.py
index 8a4dc2a..d17663e 100644
--- a/vmdebootstrap/filesystem.py
+++ b/vmdebootstrap/filesystem.py
@@ -115,9 +115,9 @@ class Filesystem(Base):
parts = 1
boot = None
swap = None
- devices = [line.split()[2]
+ devices = [line.decode('utf-8').split()[2]
for line in out.splitlines()
- if line.startswith('add map ')]
+ if line.decode('utf-8').startswith('add map ')]
if len(devices) != parts:
msg = 'Surprising number of partitions - check output of losetup -a'
logging.debug("%s", runcmd(['losetup', '-a']))
@@ -125,7 +125,7 @@ class Filesystem(Base):
raise cliapp.AppException(msg)
root = '/dev/mapper/%s' % devices[rootindex]
if self.settings['bootsize'] or self.settings['use-uefi']:
- boot = '/dev/mapper/%s' % devices[bootindex]
+ boot = '/dev/mapper/%s' % devices[bootindex].decode('utf-8')
if self.settings['swap'] > 0:
swap = '/dev/mapper/%s' % devices[swapindex]
self.devices['rootdev'] = root