|
|
|
@ -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:
|
|
|
|
|