From 9aa14a3181d697b9d03df63fe424d99891f78922 Mon Sep 17 00:00:00 2001 From: James Michael DuPont Date: Sun, 11 Jan 2015 04:56:24 -0600 Subject: [PATCH] format strings --- file_root/_modules/parted_free_disks.py | 6 +++--- file_root/_states/lvm.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/file_root/_modules/parted_free_disks.py b/file_root/_modules/parted_free_disks.py index 894be78..3864dae 100644 --- a/file_root/_modules/parted_free_disks.py +++ b/file_root/_modules/parted_free_disks.py @@ -113,14 +113,14 @@ def find_free_spaces(min_disk_size=10, max_disk_size=None): 'start': _int_to_sector(start_sector_int), 'end': _int_to_sector(end_sector_int)} else: - LOG.error('space {0} less than minimum {0}'.format( + LOG.error('space {0} less than minimum {1}'.format( disk_size_G, min_disk_size)) LOG.error('No free space found') def _last_allocated_sector(part_data): last_allocated_sector = 2048 for partition_id, partition_data in part_data.iteritems(): - LOG.debug('checking partition {0} {0}'.format( + LOG.debug('checking partition {0} {1}'.format( partition_id, str(partition_data))) sector_end_in_int = _sector_to_int(partition_data['end']) if sector_end_in_int > last_allocated_sector: @@ -140,4 +140,4 @@ def _G_to_sector(giga_bytes, sector_size): return (giga_bytes*1073741824)/sector_size def _sector_to_G(sector_length, sector_size): - return (sector_length*sector_size)/1073741824 \ No newline at end of file + return (sector_length*sector_size)/1073741824 diff --git a/file_root/_states/lvm.py b/file_root/_states/lvm.py index 4ea78aa..d8a9211 100644 --- a/file_root/_states/lvm.py +++ b/file_root/_states/lvm.py @@ -141,7 +141,7 @@ def vg_present(name, devices=None, **kwargs): else: ret['comment'] = '{0}\n{1}'.format( ret['comment'], - '{0} is part of {0}'.format( + '{0} is part of {1}'.format( device, pvs[device]['Volume Group Name'])) ret['result'] = False else: