diff --git a/image_creator/bundle_volume.py b/image_creator/bundle_volume.py index 9a9a366d2cefadfa657ada45b953bc2cdeb4b5b5..aca14b3828169e1f765af7c57929817cd3f392ae 100644 --- a/image_creator/bundle_volume.py +++ b/image_creator/bundle_volume.py @@ -380,9 +380,10 @@ class BundleVolume(object): target = tempfile.mkdtemp() try: - absmpoints = self._mount(target, - [(mapped[i], filesystem[i].mpoint) - for i in mapped.keys()]) + self._mount( + target, + [(mapped[i], filesystem[i].mpoint) for i in mapped.keys()]) + excluded = self._to_exclude() rsync = Rsync(self.out) diff --git a/image_creator/dialog_menu.py b/image_creator/dialog_menu.py index 55bcd4e3d3124d066b128698b2cfdd577dd4f58d..07fa2056b87ae1816ae2d55de64d7a6702bf564c 100644 --- a/image_creator/dialog_menu.py +++ b/image_creator/dialog_menu.py @@ -33,7 +33,6 @@ # interpreted as representing official policies, either expressed # or implied, of GRNET S.A. -import sys import os import textwrap import StringIO @@ -65,7 +64,7 @@ CONFIGURATION_TASKS = [ ] -class metadata_monitor(object): +class MetadataMonitor(object): def __init__(self, session, meta): self.session = session self.meta = meta @@ -554,7 +553,7 @@ def sysprep(session): del session['checksum'] # Monitor the metadata changes during syspreps - with metadata_monitor(session, image_os.meta): + with MetadataMonitor(session, image_os.meta): image_os.do_sysprep() infobox.finalize() @@ -590,7 +589,7 @@ def shrink(session): if not d.yesno("%s\n\nDo you want to continue?" % msg, width=WIDTH, height=12, title="Image Shrinking"): - with metadata_monitor(session, dev.meta): + with MetadataMonitor(session, dev.meta): infobox = InfoBoxOutput(d, "Image Shrinking", height=4) dev.out.add(infobox) try: @@ -640,7 +639,6 @@ def customization_menu(session): def main_menu(session): d = session['dialog'] - dev = session['device'] update_background_title(session) diff --git a/image_creator/dialog_wizard.py b/image_creator/dialog_wizard.py index 0b1b1d705fcaf303549cc491acf0b6b8c99a2f85..31aa4a2f56804c89ec700c24907c0103cbac7e4f 100644 --- a/image_creator/dialog_wizard.py +++ b/image_creator/dialog_wizard.py @@ -33,7 +33,6 @@ # interpreted as representing official policies, either expressed # or implied, of GRNET S.A. -import dialog import time import StringIO diff --git a/image_creator/disk.py b/image_creator/disk.py index a51611eb2b6fbb02ac09bd19bbfedc5ebb59d117..9017d4585375619a839e40fcc834c7661b72ba71 100644 --- a/image_creator/disk.py +++ b/image_creator/disk.py @@ -43,7 +43,6 @@ import os import tempfile import uuid import re -import sys import guestfs import shutil from sendfile import sendfile diff --git a/image_creator/kamaki_wrapper.py b/image_creator/kamaki_wrapper.py index 5963990d9f6e6c22b5a5e19fed5d30f3625dca75..f5a40c73e789b8cb6c5761e37c015e6827dac941 100644 --- a/image_creator/kamaki_wrapper.py +++ b/image_creator/kamaki_wrapper.py @@ -39,8 +39,6 @@ from kamaki.clients.image import ImageClient from kamaki.clients.pithos import PithosClient from kamaki.clients.astakos import AstakosClient -from image_creator.util import FatalError - class Kamaki(object): diff --git a/image_creator/main.py b/image_creator/main.py index 42b480ed4bec18ad886f54ea0ad5ecaab594a028..497fedfa6635d738f505e072c0148a38d866b4d4 100644 --- a/image_creator/main.py +++ b/image_creator/main.py @@ -34,7 +34,6 @@ # or implied, of GRNET S.A. from image_creator import __version__ as version -from image_creator import util from image_creator.disk import Disk from image_creator.util import FatalError, MD5 from image_creator.output.cli import SilentOutput, SimpleOutput, \ @@ -196,7 +195,6 @@ def image_creator(): except ClientError as e: raise FatalError("Astakos client: %d %s" % (e.status, e.message)) - disk = Disk(options.source, out, options.tmp) def signal_handler(signum, frame): diff --git a/image_creator/os_type/freebsd.py b/image_creator/os_type/freebsd.py index b5e7491b60beec0661697776665b041e4b4abb14..33ba8870df99091d454ecf1bd6cfa419580ccd36 100644 --- a/image_creator/os_type/freebsd.py +++ b/image_creator/os_type/freebsd.py @@ -31,7 +31,7 @@ # interpreted as representing official policies, either expressed # or implied, of GRNET S.A. -from image_creator.os_type.unix import Unix, sysprep +from image_creator.os_type.unix import Unix class Freebsd(Unix): diff --git a/image_creator/os_type/hurd.py b/image_creator/os_type/hurd.py index 98c65e5849377fe2433584e2909fad14cf289489..a294ca1a29dce64fcb20016c5bff9ea6e69d7812 100644 --- a/image_creator/os_type/hurd.py +++ b/image_creator/os_type/hurd.py @@ -31,7 +31,7 @@ # interpreted as representing official policies, either expressed # or implied, of GRNET S.A. -from image_creator.os_type.unix import Unix, sysprep +from image_creator.os_type.unix import Unix class Hurd(Unix): diff --git a/image_creator/os_type/netbsd.py b/image_creator/os_type/netbsd.py index 57e50e464d35c7cc223466ef08ca21ab09b6c082..bfb94d6b92da748711f2675a69e234021073b3dc 100644 --- a/image_creator/os_type/netbsd.py +++ b/image_creator/os_type/netbsd.py @@ -31,7 +31,7 @@ # interpreted as representing official policies, either expressed # or implied, of GRNET S.A. -from image_creator.os_type.unix import Unix, sysprep +from image_creator.os_type.unix import Unix class Netbsd(Unix): diff --git a/image_creator/os_type/ubuntu.py b/image_creator/os_type/ubuntu.py index 6a048e5ba0a6926336ec863247f508c98e4474b1..cc6e973c85de57d102ec65825c88644f002d8e76 100644 --- a/image_creator/os_type/ubuntu.py +++ b/image_creator/os_type/ubuntu.py @@ -31,7 +31,7 @@ # interpreted as representing official policies, either expressed # or implied, of GRNET S.A. -from image_creator.os_type.linux import Linux, sysprep +from image_creator.os_type.linux import Linux class Ubuntu(Linux): diff --git a/image_creator/os_type/unix.py b/image_creator/os_type/unix.py index 2cd84528eabfbb86af7821269960a6e8d7580dae..a1ef9053254de1d1f2ab6af084de4115dbbb574a 100644 --- a/image_creator/os_type/unix.py +++ b/image_creator/os_type/unix.py @@ -32,7 +32,6 @@ # or implied, of GRNET S.A. import re -import sys from image_creator.os_type import OSBase, sysprep diff --git a/image_creator/os_type/windows.py b/image_creator/os_type/windows.py index 405a7d94e62d0eef7e0f399d416bc8b0831c5c8d..7ba67672a7a6bf118d37e65b05814b165a5b79d4 100644 --- a/image_creator/os_type/windows.py +++ b/image_creator/os_type/windows.py @@ -31,7 +31,7 @@ # interpreted as representing official policies, either expressed # or implied, of GRNET S.A. -from image_creator.os_type import OSBase, sysprep +from image_creator.os_type import OSBase class Windows(OSBase): diff --git a/image_creator/util.py b/image_creator/util.py index 8730143737527457a2a288aa016a55949325c472..b4d500068198b3d4dd59f3e94002c74e04648318 100644 --- a/image_creator/util.py +++ b/image_creator/util.py @@ -31,7 +31,6 @@ # interpreted as representing official policies, either expressed # or implied, of GRNET S.A. -import sys import sh import hashlib import time