Minor pathing fixes

This commit is contained in:
Ian Gulliver
2016-05-17 16:11:38 -07:00
parent 1f406af2ee
commit d7971547ce
2 changed files with 4 additions and 6 deletions

View File

@@ -142,12 +142,10 @@ class Imager(object):
FLAGS.https_client_cert, FLAGS.https_client_cert,
FLAGS.https_client_key) FLAGS.https_client_key)
def _UpdateGrub(self, root, image_dir): def _UpdateGrub(self, image_dir, root):
boot_dir = os.path.join(root, 'isodevice')
update = update_grub.GrubUpdater( update = update_grub.GrubUpdater(
image_dir, image_dir,
boot_dir) root)
update.Update() update.Update()
def _FetchImages(self, root): def _FetchImages(self, root):
@@ -164,7 +162,7 @@ class Imager(object):
root = self._MountBoot() root = self._MountBoot()
self._InstallGrub(root) self._InstallGrub(root)
image_dir = self._FetchImages(root) image_dir = self._FetchImages(root)
self._UpdateGrub(root, image_dir) self._UpdateGrub(image_dir, root)
def Image(self): def Image(self):
self._umount = [] self._umount = []

View File

@@ -14,7 +14,7 @@ class GrubUpdater(object):
self._image_dir = image_dir self._image_dir = image_dir
self._boot_dir = boot_dir self._boot_dir = boot_dir
assert self._image_dir.startswith(self._boot_dir) assert self._image_dir.startswith(self._boot_dir), (self._image_dir, self._boot_dir)
self._image_path = '/' + os.path.relpath(self._image_dir, self._boot_dir) self._image_path = '/' + os.path.relpath(self._image_dir, self._boot_dir)