Minor fixes in output messages
authorNikos Skalkotos <skalkoto@grnet.gr>
Thu, 3 Jan 2013 12:29:24 +0000 (14:29 +0200)
committerNikos Skalkotos <skalkoto@grnet.gr>
Thu, 3 Jan 2013 12:52:54 +0000 (14:52 +0200)
image_creator/dialog_wizard.py
image_creator/disk.py
image_creator/main.py
image_creator/output/cli.py
image_creator/output/dialog.py
image_creator/rsync.py

index a66cf38..66f6bbf 100644 (file)
@@ -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()
index f8794ba..d165053 100644 (file)
@@ -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)
 
index 9996dd6..3161bb5 100644 (file)
@@ -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()
index 2859552..6e2404c 100644 (file)
@@ -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 :
index 0cde2a7..28ca0b4 100644 (file)
@@ -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):
index 81476f2..9ae22b6 100644 (file)
@@ -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: