From fb7b982da08619fad2c582f921c05cf982621c0b Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Fri, 4 Oct 2013 18:29:12 -0400 Subject: pep8 and pylint fixes --- cloudinit/config/cc_disk_setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cloudinit/config/cc_disk_setup.py') diff --git a/cloudinit/config/cc_disk_setup.py b/cloudinit/config/cc_disk_setup.py index e903dd4d..0b970e4e 100644 --- a/cloudinit/config/cc_disk_setup.py +++ b/cloudinit/config/cc_disk_setup.py @@ -484,12 +484,13 @@ def get_partition_mbr_layout(size, layout): def purge_disk_ptable(device): # wipe the first and last megabyte of a disk (or file) # gpt stores partition table both at front and at end. + null = '\0' # pylint: disable=W1401 start_len = 1024 * 1024 end_len = 1024 * 1024 with open(device, "rb+") as fp: - fp.write('\0' * (start_len)) + fp.write(null * (start_len)) fp.seek(-end_len, os.SEEK_END) - fp.write('\0' * end_len) + fp.write(null * end_len) fp.flush() read_parttbl(device) -- cgit v1.2.3