~ubuntu-branches/ubuntu/quantal/gutenprint/quantal

« back to all changes in this revision

Viewing changes to debian/local/pyppd/pyppd/pyppd-ppdfile.in

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2010-09-16 01:07:03 UTC
  • Revision ID: james.westby@ubuntu.com-20100916010703-09vh0fuxy1cg74q7
Tags: 5.2.6-0ubuntu5
debian/local/pyppd/pyppd/ppd.py, debian/local/pyppd/pyppd/pyppd-ppdfile.in:
Let the compressed PPD archives not contain duplicate PPD URIs, even if the
lines reference the same PPD. Most printer setup tools cannot cope with
duplicate PPD URIs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
def cat(ppd):
29
29
    # Ignore driver's name, take only PPD's
30
30
    ppd = ppd.split(":")[-1]
 
31
    # Remove also the index
 
32
    ppd = "0/" + ppd[ppd.find("/")+1:]
31
33
 
32
34
    ppds = load()
33
35
    ppds['ARCHIVE'] = StringIO(decompress(ppds['ARCHIVE']))