Package: photon Version: 0.4.6-1.1 Severity: normal Tags: patch upstream Attached are patches fixing the string exceptions.
-- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (900, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages photon depends on: ii python 2.6.6-3+squeeze1 interactive high-level object-orie ii python-central 0.6.16+nmu1 register and build utility for Pyt ii python-imaging 1.1.7-2 Python Imaging Library Versions of packages photon recommends: ii dcraw 8.99-1+b1 decode raw digital camera images ii gimp 2.6.10-1 The GNU Image Manipulation Program photon suggests no packages. -- no debconf information
--- ../photonpkg/usr/share/pyshared/Photon/PxM.py 2008-07-18 08:51:15.000000000 -0700 +++ /usr/lib/python2.6/dist-packages/Photon/PxM.py 2010-11-25 02:34:48.098771564 -0800 @@ -11,7 +11,7 @@ def identify_P6(h): if h[0] == '#': - raise "I don't support comment in a PPM file" + raise Exception("I don't support comments in a PPM file") m = re.search("^(\d+)\s(\d+)", h) if not m:
--- photonpkg/usr/bin/photon 2008-07-18 08:51:16.000000000 -0700 +++ /usr/bin/photon 2010-11-25 02:25:43.969272127 -0800 @@ -513,28 +513,7 @@ npicsconverted+=1 if file_is_newer(destfile, srcfile): safe_mkdir(destdir) - # We have 2 choices use Gimp,use Python Library, or our internal parser - if options['resize_plugin'] == "gimp": - if w*h<64000: - gimp_file = (srcfile,destfile,newsize,options['resize_quality_low']) - else: - gimp_file = (srcfile,destfile,newsize,options['resize_quality_high']) - gimp_list.append(gimp_file) - elif options['resize_plugin'] == 'pil': - try: - if im.mode == 'P': # Image is in palette mode, convert it to 24bits - im = im.convert('RGB') - im.resize(newsize, Image.BICUBIC).save(destfile, 'JPEG', optimize=1, progressive=1) - except IOError, err: - print "Error while writing thumbnail, will try without optimization..." - print "Perhaps you can try to increase ImageFile.MAXBLOCK in the source file" - print err - try: # Try to save the Jpeg file without progessive option - im.resize(newsize,Image.BICUBIC).save(destfile, 'JPEG') - except IOError, err: - print "cannot create ", destfile, "(", err, ")" - else: # Use the python internal module resize method - raise("Error: resize plugin not know") + resize_image(srcfile, destfile, newsize) # Process comment for this file only commentfile = srcfile + '.comments' try: @@ -1591,7 +1570,7 @@ except IOError, err: print "cannot create ", destfile, "(", err, ")" else: # Use the python internal module resize method - raise("Error: resize plugin not know") + raise Exception("Error: resize plugin not known") # ------------------------------------------------------------------------ def make_shortcut_js(pathname): #