- When updating foomatic PPDs, don't give a traceback if some PPD is not

strictly conformant (bug #481397).
This commit is contained in:
Tim Waugh 2009-01-29 12:34:36 +00:00
parent 54d76448f2
commit cb7a209789
2 changed files with 11 additions and 2 deletions

View File

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

View File

@ -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 <twaugh@redhat.com> 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 <twaugh@redhat.com> 5.2.3-3
- Don't use popen2 in the foomatic PPD update script.