diff --git a/gutenprint-foomaticppdupdate b/gutenprint-foomaticppdupdate index b8b66e8..47958b8 100644 --- a/gutenprint-foomaticppdupdate +++ b/gutenprint-foomaticppdupdate @@ -55,7 +55,12 @@ def generate_ppd (ppdfile, printer, driver): return ppdobj def update_ppdfile (ppdfile): - ppd = cups.PPD (ppdfile) + try: + ppd = cups.PPD (ppdfile) + except RuntimeError: + # Invalid PPD in some way. + return + attr = ppd.findAttr ("FoomaticIDs") if not attr: return diff --git a/gutenprint.spec b/gutenprint.spec index 89a817c..464d188 100644 --- a/gutenprint.spec +++ b/gutenprint.spec @@ -4,7 +4,7 @@ Name: gutenprint Summary: Printer Drivers Package. Version: 5.2.3 -Release: 3%{?dist} +Release: 4%{?dist} Group: System Environment/Base URL: http://gimp-print.sourceforge.net/ Source0: http://dl.sf.net/gimp-print/gutenprint-%{version}.tar.bz2 @@ -254,6 +254,10 @@ fi /bin/rm -f /var/cache/foomatic/* %changelog +* Thu Jan 29 2009 Tim Waugh 5.2.3-4 +- When updating foomatic PPDs, don't give a traceback if some PPD is + not strictly conformant (bug #481397). + * Sat Jan 10 2009 Tim Waugh 5.2.3-3 - Don't use popen2 in the foomatic PPD update script.