From 663f5f807b6685a8af18b539f0802683575103d5 Mon Sep 17 00:00:00 2001
From: Nikos Skalkotos <skalkoto@grnet.gr>
Date: Thu, 3 Jan 2013 14:29:24 +0200
Subject: [PATCH] Minor fixes in output messages

---
 image_creator/dialog_wizard.py | 6 +++---
 image_creator/disk.py          | 6 +++---
 image_creator/main.py          | 8 ++++----
 image_creator/output/cli.py    | 2 +-
 image_creator/output/dialog.py | 2 +-
 image_creator/rsync.py         | 2 +-
 6 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/image_creator/dialog_wizard.py b/image_creator/dialog_wizard.py
index a66cf38..66f6bbf 100644
--- a/image_creator/dialog_wizard.py
+++ b/image_creator/dialog_wizard.py
@@ -272,18 +272,18 @@ def create_image(session):
                                             "(1/4)  Calculating block hashes",
                                             "(2/4)  Uploading missing blocks")
 
-            out.output("(3/4)  Uploading metadata file...", False)
+            out.output("(3/4)  Uploading metadata file ...", False)
             kamaki.upload(StringIO.StringIO(metastring), size=len(metastring),
                           remote_path="%s.%s" % (name, 'meta'))
             out.success('done')
-            out.output("(4/4)  Uploading md5sum file...", False)
+            out.output("(4/4)  Uploading md5sum file ...", False)
             md5sumstr = '%s %s\n' % (session['checksum'], name)
             kamaki.upload(StringIO.StringIO(md5sumstr), size=len(md5sumstr),
                           remote_path="%s.%s" % (name, 'md5sum'))
             out.success('done')
             out.output()
 
-            out.output('Registering image with ~okeanos...', False)
+            out.output('Registering image with ~okeanos ...', False)
             kamaki.register(wizard['ImageName'], pithos_file, metadata)
             out.success('done')
             out.output()
diff --git a/image_creator/disk.py b/image_creator/disk.py
index f8794ba..d165053 100644
--- a/image_creator/disk.py
+++ b/image_creator/disk.py
@@ -114,7 +114,7 @@ class Disk(object):
         instance.
         """
 
-        self.out.output("Examining source media `%s'..." % self.source, False)
+        self.out.output("Examining source media `%s' ..." % self.source, False)
         sourcedev = self.source
         mode = os.stat(self.source).st_mode
         if stat.S_ISDIR(mode):
@@ -261,7 +261,7 @@ class DiskDevice(object):
 
         mount = self.g.mount_ro if readonly else self.g.mount
         msg = " read-only" if readonly else ""
-        self.out.output("Mounting the media%s..." % msg, False)
+        self.out.output("Mounting the media%s ..." % msg, False)
         mps = self.g.inspect_get_mountpoints(self.root)
 
         # Sort the keys to mount the fs in a correct order.
@@ -340,7 +340,7 @@ class DiskDevice(object):
 
         MB = 2 ** 20
 
-        self.out.output("Shrinking image (this may take a while)...", False)
+        self.out.output("Shrinking image (this may take a while) ...", False)
 
         sector_size = self.g.blockdev_getss(self.guestfs_device)
 
diff --git a/image_creator/main.py b/image_creator/main.py
index 9996dd6..3161bb5 100644
--- a/image_creator/main.py
+++ b/image_creator/main.py
@@ -243,12 +243,12 @@ def image_creator():
         if options.outfile is not None:
             dev.dump(options.outfile)
 
-            out.output('Dumping metadata file...', False)
+            out.output('Dumping metadata file ...', False)
             with open('%s.%s' % (options.outfile, 'meta'), 'w') as f:
                 f.write(metastring)
             out.success('done')
 
-            out.output('Dumping md5sum file...', False)
+            out.output('Dumping md5sum file ...', False)
             with open('%s.%s' % (options.outfile, 'md5sum'), 'w') as f:
                 f.write('%s %s\n' % (checksum,
                                      os.path.basename(options.outfile)))
@@ -275,7 +275,7 @@ def image_creator():
                               size=len(metastring),
                               remote_path="%s.%s" % (options.upload, 'meta'))
                 out.success('done')
-                out.output("(4/4)  Uploading md5sum file...", False)
+                out.output("(4/4)  Uploading md5sum file ...", False)
                 md5sumstr = '%s %s\n' % (checksum,
                                          os.path.basename(options.upload))
                 kamaki.upload(StringIO.StringIO(md5sumstr),
@@ -285,7 +285,7 @@ def image_creator():
                 out.output()
 
             if options.register:
-                out.output('Registering image with ~okeanos...', False)
+                out.output('Registering image with ~okeanos ...', False)
                 kamaki.register(options.register, uploaded_obj, metadata)
                 out.success('done')
                 out.output()
diff --git a/image_creator/output/cli.py b/image_creator/output/cli.py
index 2859552..6e2404c 100644
--- a/image_creator/output/cli.py
+++ b/image_creator/output/cli.py
@@ -116,7 +116,7 @@ class OutputWthProgress(SimpleOutput):
             self.start()
 
         def success(self, result):
-            self.output.output("\r%s...\033[K" % self.title, False)
+            self.output.output("\r%s ...\033[K" % self.title, False)
             self.output.success(result)
 
 # vim: set sta sts=4 shiftwidth=4 sw=4 et ai :
diff --git a/image_creator/output/dialog.py b/image_creator/output/dialog.py
index 0cde2a7..28ca0b4 100644
--- a/image_creator/output/dialog.py
+++ b/image_creator/output/dialog.py
@@ -86,7 +86,7 @@ class GaugeOutput(Output):
         def __init__(self, size, title, bar_type='default'):
             self.output.size = size
             self.bar_type = bar_type
-            self.output.msg = "%s..." % title
+            self.output.msg = "%s ..." % title
             self.goto(0)
 
         def _postfix(self):
diff --git a/image_creator/rsync.py b/image_creator/rsync.py
index 81476f2..9ae22b6 100644
--- a/image_creator/rsync.py
+++ b/image_creator/rsync.py
@@ -107,7 +107,7 @@ class Rsync:
         self._out.success("%d" % total)
 
         progress = self._out.Progress(total,
-                                     "Copying host files into the image ... ")
+                                      "Copying host files into the image")
         run = subprocess.Popen(cmd + [src, dest], shell=False,
                                stdout=subprocess.PIPE, bufsize=0)
         try:
-- 
GitLab