Fixed date handling

svn: r496
This commit is contained in:
Don Allingham 2001-10-19 14:58:41 +00:00
parent aebc5bff54
commit cc4da84208

View File

@ -35,10 +35,8 @@ _ = intl.gettext
try: try:
import PIL.Image import PIL.Image
no_pil = 0 no_pil = 0
print "pil ok"
except: except:
no_pil = 1 no_pil = 1
print "pil bad"
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -127,13 +125,11 @@ def mk_thumb(source,dest,size):
if no_pil: if no_pil:
cmd = "%s -geometry %dx%d '%s' '%s'" % (const.convert,size,size,source,dest) cmd = "%s -geometry %dx%d '%s' '%s'" % (const.convert,size,size,source,dest)
print cmd
os.system(cmd) os.system(cmd)
else: else:
try: try:
im = PIL.Image.open(source) im = PIL.Image.open(source)
im.thumbnail((size,size)) im.thumbnail((size,size))
print "save",source,dest
im.save(dest,"JPEG") im.save(dest,"JPEG")
except: except:
pass pass