~tualatrix/ubuntu-tweak/trunk

« back to all changes in this revision

Viewing changes to ubuntutweak/settings/gconfsettings.py

  • Committer: Tualatrix Chou
  • Date: 2012-06-15 16:11:54 UTC
  • mfrom: (1860.1.1 ubuntu-tweak-0.7.x)
  • Revision ID: tualatrix@gmail.com-20120615161154-lpbj46pe7bzt7fkv
Catch Exception while processing override in gconfsetting (bug: #1013656)

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
    def load_override(self):
36
36
        for override in glob.glob('/usr/share/gconf/defaults/*'):
37
37
            for line in open(override):
38
 
                splits = line.split()
39
 
                key, value = splits[0], ' '.join(splits[1:])
40
 
 
41
 
                if value == 'true':
42
 
                    value = True
43
 
                elif value == 'false':
44
 
                    value = False
45
 
                else:
46
 
                    if value.startswith('"') and value.endswith('"'):
47
 
                        value = eval(value)
48
 
 
49
 
                self.schema_override[key] = value
 
38
                try:
 
39
                    splits = line.split()
 
40
                    key, value = splits[0], ' '.join(splits[1:])
 
41
 
 
42
                    if value == 'true':
 
43
                        value = True
 
44
                    elif value == 'false':
 
45
                        value = False
 
46
                    else:
 
47
                        if value.startswith('"') and value.endswith('"'):
 
48
                            value = eval(value)
 
49
 
 
50
                    print aa
 
51
 
 
52
                    self.schema_override[key] = value
 
53
                except Exception, e:
 
54
                    log.error('Exception (%s) while processing "%s"' % (e, line))
50
55
 
51
56
    def get_dir(self):
52
57
        if self.key: