From 81d03ab87cfabb5b9d8c7ae1a19bb7f3ff2338ac Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Sun, 17 Jan 2016 14:29:11 +0000 Subject: runtime python3 changes --- vmdebootstrap/filesystem.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vmdebootstrap') 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 -- cgit v1.2.1