Commit 062dedef authored by Nikos Skalkotos's avatar Nikos Skalkotos

Fix minor pylint warning and output messages

parent 1aa0184e
......@@ -489,7 +489,7 @@ def create_image(session, answers):
text = "The %s image was successfully uploaded to the storage service " \
"and registered with the compute service of %s. Would you like " \
"to keep a local copy?" % \
(answers['Cloud'], answers['RegistrationType'].lower())
(answers['RegistrationType'].lower(), answers['Cloud'])
if not session['dialog'].yesno(text, width=PAGE_WIDTH):
extract_image(session)
......
......@@ -152,8 +152,8 @@ class Disk(object):
"""Creates a snapshot of the original source media of the Disk
instance.
"""
self.out.output("Snapshotting media source ...", False)
size = blockdev('--getsz', self.device)
self.out.output("Snapshotting media source ...", False)
cowfd, cow = tempfile.mkstemp(dir=self.tmp)
os.close(cowfd)
self._add_cleanup(os.unlink, cow)
......@@ -165,8 +165,9 @@ class Disk(object):
tablefd, table = tempfile.mkstemp()
try:
try:
os.write(tablefd, "0 %d snapshot %s %s n 8" %
(int(size), self.device, cowdev))
os.write(tablefd,
"0 %d snapshot %s %s n 8" %
(int(size), self.device, cowdev))
finally:
os.close(tablefd)
......
......@@ -549,7 +549,7 @@ class Windows(OSBase):
# Since the password is reset when logging in, sleep a little
# bit before checking the connectivity, to avoid race
# conditions
time.sleep(2)
time.sleep(5)
self.out.output("Checking connectivity to the VM ...", False)
self._check_connectivity()
......@@ -835,7 +835,7 @@ class Windows(OSBase):
"""
with self.mount(readonly=False, silent=True):
# Reset Password
self._add_cleanup('virtio',self.registry.reset_passwd,
self._add_cleanup('virtio', self.registry.reset_passwd,
self.vm.admin.rid,
self.registry.reset_passwd(self.vm.admin.rid))
......
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