forked from openlp/openlp
clean up pep8
This commit is contained in:
parent
3b7852b569
commit
7c1fffdf41
@ -482,16 +482,3 @@ def get_file_encoding(filename):
|
||||
return detector.result
|
||||
except OSError:
|
||||
log.exception('Error detecting file encoding')
|
||||
|
||||
|
||||
def json_default(obj):
|
||||
"""
|
||||
Function to help save objects as JSON
|
||||
|
||||
:param obj: object
|
||||
:return: the object dictionary
|
||||
"""
|
||||
try:
|
||||
return obj.__dict__
|
||||
except:
|
||||
raise TypeError("Unserializable object {} of type {}".format(obj, type(obj)))
|
||||
|
Loading…
Reference in New Issue
Block a user