Изменена команда получения размера изображения для совместимости с graphicsmagick

legacy27 3.6.7.13
Mike Hiretsky 4 years ago
parent 0731489d81
commit 7bdbcc65aa

@ -129,11 +129,11 @@ class backgrounds(TemplateFormat):
identify = process(self.chroot_cmd, self.chroot_path,
self.bash_cmd, "-c",
" ".join([self.identify_cmd,
"-format '%[w] %[h]'", source]))
"-format '%w %h'", source]))
else:
identify = process(self.identify_cmd, "-format", "%[w] %[h]", source)
identify = process(self.identify_cmd, "-format", "%w %h", source)
if identify.success():
swidth, _sep, sheight = identify.read().partition(" ")
swidth, _sep, sheight = identify.read().strip().partition(" ")
if swidth.isdigit() and sheight.isdigit():
return int(swidth), int(sheight)
return None, None
@ -144,7 +144,7 @@ class backgrounds(TemplateFormat):
if not (self.convert_cmd and self.identify_cmd):
self.setError("%s. %s" % (_("The 'backgrounds' format is unavailable"),
_("Need to install {packages}").format(
packages="media-gfx/imagemagick")))
packages="virtual/imagemagick-tools")))
return False
if not self.source:
if not self.mirror:

Loading…
Cancel
Save