Commit 61d14323 authored by Nikos Skalkotos's avatar Nikos Skalkotos

Clean-up the code using flake8

parent fd6621a4
......@@ -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)
......
......@@ -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)
......
......@@ -33,7 +33,6 @@
# interpreted as representing official policies, either expressed
# or implied, of GRNET S.A.
import dialog
import time
import StringIO
......
......@@ -43,7 +43,6 @@ import os
import tempfile
import uuid
import re
import sys
import guestfs
import shutil
from sendfile import sendfile
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -32,7 +32,6 @@
# or implied, of GRNET S.A.
import re
import sys
from image_creator.os_type import OSBase, sysprep
......
......@@ -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):
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment