forked from openlp/openlp
Fix up error handling
bzr-revno: 182
This commit is contained in:
parent
fce0830e56
commit
753eee645c
@ -41,16 +41,19 @@ class LinRegistry(Registry):
|
|||||||
"""
|
"""
|
||||||
Get a single value from the registry.
|
Get a single value from the registry.
|
||||||
"""
|
"""
|
||||||
if self.config.has_value(section, key):
|
try:
|
||||||
|
if self.config.get(section, key):
|
||||||
return self.config.get(section, key)
|
return self.config.get(section, key)
|
||||||
else:
|
else:
|
||||||
return default
|
return default
|
||||||
|
except:
|
||||||
|
return default
|
||||||
|
|
||||||
def set_value(self, section, key, value):
|
def set_value(self, section, key, value):
|
||||||
"""
|
"""
|
||||||
Set a single value in the registry.
|
Set a single value in the registry.
|
||||||
"""
|
"""
|
||||||
try:
|
try :
|
||||||
self.config.set(section, key, value)
|
self.config.set(section, key, value)
|
||||||
return self._save()
|
return self._save()
|
||||||
except:
|
except:
|
||||||
|
Loading…
Reference in New Issue
Block a user