forked from openlp/openlp
indentation fix
This commit is contained in:
parent
57cc60e1bd
commit
235748a9e9
@ -42,7 +42,7 @@ class Registry(object):
|
|||||||
Check if a value exists.
|
Check if a value exists.
|
||||||
"""
|
"""
|
||||||
return self.config.has_option(section.encode('utf-8'),
|
return self.config.has_option(section.encode('utf-8'),
|
||||||
key.encode('utf-8'))
|
key.encode('utf-8'))
|
||||||
|
|
||||||
def get_value(self, section, key, default=None):
|
def get_value(self, section, key, default=None):
|
||||||
"""
|
"""
|
||||||
@ -51,7 +51,7 @@ class Registry(object):
|
|||||||
try:
|
try:
|
||||||
if self.config.get(section.encode('utf-8'), key.encode('utf-8')):
|
if self.config.get(section.encode('utf-8'), key.encode('utf-8')):
|
||||||
return self.config.get(section.encode('utf-8'),
|
return self.config.get(section.encode('utf-8'),
|
||||||
key.encode('utf-8')).decode('utf-8')
|
key.encode('utf-8')).decode('utf-8')
|
||||||
else:
|
else:
|
||||||
return default
|
return default
|
||||||
except:
|
except:
|
||||||
@ -63,7 +63,7 @@ class Registry(object):
|
|||||||
"""
|
"""
|
||||||
try :
|
try :
|
||||||
self.config.set(section.encode('utf-8'), key.encode('utf-8'),
|
self.config.set(section.encode('utf-8'), key.encode('utf-8'),
|
||||||
unicode(value).encode('utf-8'))
|
unicode(value).encode('utf-8'))
|
||||||
return self._save()
|
return self._save()
|
||||||
except:
|
except:
|
||||||
return False
|
return False
|
||||||
@ -74,7 +74,7 @@ class Registry(object):
|
|||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
self.config.remove_option(section.encode('utf-8'),
|
self.config.remove_option(section.encode('utf-8'),
|
||||||
key.encode('utf-8'))
|
key.encode('utf-8'))
|
||||||
return self._save()
|
return self._save()
|
||||||
except:
|
except:
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user