Skip to content

Commit

Permalink
Merge pull request #273 from bil-elmoussaoui/autofix/wrapped2_to3_fix
Browse files Browse the repository at this point in the history
Fix "Prefer `format()` over string interpolation operator" issue
  • Loading branch information
bilelmoussaoui authored Jan 3, 2017
2 parents 3b9a883 + 4096ff2 commit 8fdddfb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/svg/imagemagick.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def convert_to_png(self, input_file, output_file, width=None, height=None):
"""Convert svg to png."""
cmd = [self.cmd, "-background", "none"]
if width and height:
cmd.extend(["-size", "%sx%s" % (str(width), str(height))])
cmd.extend(["-size", "{0!s}x{1!s}".format(str(width), str(height))])
cmd.extend([input_file, output_file])
execute(cmd)

Expand Down
2 changes: 1 addition & 1 deletion modules/svg/svgexport.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def convert_to_png(self, input_file, output_file, width=None, height=None):
"""Convert svg to png."""
cmd = [self.cmd, input_file, output_file]
if width and height:
cmd.extend(["%s:%s" % (str(width), str(height))])
cmd.extend(["{0!s}:{1!s}".format(str(width), str(height))])
cmd.extend([input_file, output_file])
execute(cmd)

Expand Down

0 comments on commit 8fdddfb

Please sign in to comment.