forked from openlp/openlp
adds bytes type
This commit is contained in:
parent
77109e61fd
commit
fa5b036323
@ -25,7 +25,6 @@ This class contains the core default settings.
|
|||||||
import datetime
|
import datetime
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
@ -46,10 +45,17 @@ if is_linux():
|
|||||||
|
|
||||||
|
|
||||||
def recent_files_conv(value):
|
def recent_files_conv(value):
|
||||||
|
"""
|
||||||
|
If the value is not a list convert it yo a list
|
||||||
|
:param value: Value to convert
|
||||||
|
:return:value as a List
|
||||||
|
"""
|
||||||
if isinstance(value, list):
|
if isinstance(value, list):
|
||||||
return value
|
return value
|
||||||
elif isinstance(value, str):
|
elif isinstance(value, str):
|
||||||
return [value]
|
return [value]
|
||||||
|
elif isinstance(value, bytes):
|
||||||
|
return [value.decode()]
|
||||||
|
|
||||||
|
|
||||||
class Settings(QtCore.QSettings):
|
class Settings(QtCore.QSettings):
|
||||||
|
Loading…
Reference in New Issue
Block a user