Small fixes, debug print

This commit is contained in:
Jeroen Goudsmit 2010-02-05 22:27:13 +01:00
parent a1811a0a74
commit 4fae39c67f

View file

@ -240,7 +240,7 @@ class Worker(QThread):
name = oldfile.fileName()
oldfilesize = oldfile.size()
oldfilesizestr = size(oldfilesize, system=alternative)
print type(filename)
# get extention
baseName, extention = os.path.splitext(filename)
@ -248,13 +248,13 @@ class Worker(QThread):
if extention in ['.jpg', '.jpeg']:
runString = 'jpegoptim -f --strip-all "%(file)s"'
elif extention in ['.png']:
runString = 'optipng -force -o7 "%(file)s"; advpng -z4 "%(file)"'
runString = 'optipng -force -o7 "%(file)s"; advpng -z4 "%(file)s"'
else:
# This probably should never happen...
raise Exception('File %s does not have the appropriate extention' % filename)
try:
retcode = call(runString % {'file' : filename, shell = True, stdout = PIPE)
retcode = call(runString % {'file' : filename}, shell = True, stdout = PIPE)
runfile = retcode
except OSError, e:
runfile = e