From f2ddf4db58fc537e66d60739d2a43ca6d5ceb902 Mon Sep 17 00:00:00 2001 From: Nikos Skalkotos Date: Thu, 10 Jan 2013 19:25:27 +0200 Subject: [PATCH] Fix minor issues in output messages --- image_creator/bundle_volume.py | 6 +++--- image_creator/dialog_main.py | 4 ++++ image_creator/rsync.py | 3 +-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/image_creator/bundle_volume.py b/image_creator/bundle_volume.py index fc35352..0d642d5 100644 --- a/image_creator/bundle_volume.py +++ b/image_creator/bundle_volume.py @@ -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") diff --git a/image_creator/dialog_main.py b/image_creator/dialog_main.py index 21fa873..9f4d7e8 100644 --- a/image_creator/dialog_main.py +++ b/image_creator/dialog_main.py @@ -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: diff --git a/image_creator/rsync.py b/image_creator/rsync.py index 5d1d5c1..08bc27a 100644 --- a/image_creator/rsync.py +++ b/image_creator/rsync.py @@ -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: -- 1.7.10.4