Fix minor issues in output messages
authorNikos Skalkotos <skalkoto@grnet.gr>
Thu, 10 Jan 2013 17:25:27 +0000 (19:25 +0200)
committerNikos Skalkotos <skalkoto@grnet.gr>
Thu, 10 Jan 2013 17:25:27 +0000 (19:25 +0200)
image_creator/bundle_volume.py
image_creator/dialog_main.py
image_creator/rsync.py

index fc35352..0d642d5 100644 (file)
@@ -389,7 +389,7 @@ class BundleVolume(object):
                     rsync.exclude(excl)
 
                 rsync.archive().hard_links().xattrs().sparse().acls()
-                rsync.run('/', target, 'host', 'tmp image')
+                rsync.run('/', target, 'host', 'temporary image')
 
                 # We need to replace the old UUID referencies with the new
                 # ones in grub configuration files and /etc/fstab for file
@@ -433,9 +433,9 @@ class BundleVolume(object):
 
         # Check if the available space is enough to host the image
         dirname = os.path.dirname(image)
-        self.out.output("Examining available space in %s ..." % dirname, False)
+        self.out.output("Examining available space ..." % dirname, False)
         if free_space(dirname) <= size:
-            raise FatalError('Not enough space in %s to host the image' %
+            raise FatalError('Not enough space under %s to host the image' %
                              dirname)
         self.out.success("sufficient")
 
index 21fa873..9f4d7e8 100644 (file)
@@ -133,6 +133,10 @@ def image_creator(d, media, out, tmp):
 
 
 def select_file(d, media):
+
+    if media == '/':
+        return '/'
+
     default = os.getcwd() + os.sep
     while 1:
         if media is not None:
index 5d1d5c1..08bc27a 100644 (file)
@@ -107,8 +107,7 @@ class Rsync:
 
         self._out.success("%d" % total)
 
-        progress = self._out.Progress(total, "Copying %s files to %s" %
-                                      (slabel, dlabel))
+        progress = self._out.Progress(total, "Copying files to %s" % dlabel)
         run = subprocess.Popen(cmd + [src, dest], shell=False,
                                stdout=subprocess.PIPE, bufsize=0)
         try: