~ubuntu-branches/ubuntu/saucy/lubuntu-software-center/saucy-proposed

« back to all changes in this revision

Viewing changes to scripts/lubuntu-software-center-build-db

  • Committer: Package Import Robot
  • Author(s): Julien Lavergne
  • Date: 2013-04-08 13:40:13 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20130408134013-1biosf1kdpyjth09
Tags: 0.0.5~bzr159-0ubuntu1
* New upstream snapshot, including only bug fixes and translation updates:
 - Fix errors when parsing some .desktop files (LP: #1158452).

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
import sys
26
26
import os
27
27
from xdg import DesktopEntry as DE
 
28
import xdg
28
29
import apt_pkg
29
30
from ConfigParser import RawConfigParser
30
31
import platform
100
101
 
101
102
for item in aiddir:
102
103
    if item.partition(".desktop")[-2] == ".desktop":
103
 
        single_pkg = DE.DesktopEntry(base_folder+item)
 
104
        try:
 
105
            single_pkg = DE.DesktopEntry(base_folder+item)
 
106
        except xdg.Exceptions.ParsingError:
 
107
            print("fail to parse %s" % item)
 
108
        except ParsingError:
 
109
            print("fail to parse %s" % item)
104
110
        name = single_pkg.getName()
105
111
        pkg = single_pkg.get("X-AppInstall-Package")
106
112
        icon = single_pkg.get("Icon")