[f22-branch 1/2] Use %d format string for every value that should be an integer decimal. (#1205183)

dashea installerbot-noreply at redhat.com
Fri Apr 10 15:17:25 UTC 2015


From: mulhern <amulhern at redhat.com>

Don't convert any of the values to an int. %d will do that conversion.

(cherry picked from commit 7cc412fbbd1ea99159d3f001c764dc5515af5fe5)

Conflicts:
	blivet/devices/partition.py
---
 blivet/devices/partition.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/blivet/devices/partition.py b/blivet/devices/partition.py
index 504d7e1..6d5a311 100644
--- a/blivet/devices/partition.py
+++ b/blivet/devices/partition.py
@@ -539,8 +539,8 @@ def _wipe(self):
         # Erase 1MiB or to end of partition
         count = min(int(Size("1 MiB") // bs), part_len)
 
-        cmd = ["dd", "if=/dev/zero", "of=%s" % device, "bs=%s" % bs,
-               "seek=%s" % start, "count=%s" % count]
+        cmd = ["dd", "if=/dev/zero", "of=%s" % device, "bs=%d" % bs,
+               "seek=%d" % start, "count=%d" % count]
         try:
             util.run_program(cmd)
         except OSError as e:


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/5cf782afbaac9264078a9754aa4b7f8c80b91fa2


More information about the anaconda-patches mailing list