Skip to content

Commit

Permalink
scripts/genconfig.py: fix format specs for older Python
Browse files Browse the repository at this point in the history
Python versions older than 2.7 require numbered format specifiers.

Change-Id: I74dd204836c202a79c31c08f0096c31fcb325385
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
  • Loading branch information
danielverkamp committed Jan 13, 2017
1 parent e1b607d commit f348a09
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/genconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
val = args[var]
if default.lower() == 'y' or default.lower() == 'n':
if val.lower() == 'y':
print "#define SPDK_{} 1".format(var)
print "#define SPDK_{0} 1".format(var)
else:
print "#undef SPDK_{}".format(var)
print "#undef SPDK_{0}".format(var)
else:
strval = val.replace('"', '\"')
print "#define SPDK_{} \"{}\"".format(var, strval)
print "#define SPDK_{0} \"{1}\"".format(var, strval)

0 comments on commit f348a09

Please sign in to comment.