forked from openlp/openlp
Unused function: string_is_unicode
This commit is contained in:
parent
0f89b9f771
commit
4ae1a12b59
@ -459,25 +459,6 @@ def file_is_unicode(filename):
|
|||||||
return None
|
return None
|
||||||
return ucsfile
|
return ucsfile
|
||||||
|
|
||||||
def string_is_unicode(test_string):
|
|
||||||
"""
|
|
||||||
Makes sure a string is unicode.
|
|
||||||
|
|
||||||
``test_string``
|
|
||||||
The string to confirm is unicode.
|
|
||||||
"""
|
|
||||||
return_string = u''
|
|
||||||
if not test_string:
|
|
||||||
return return_string
|
|
||||||
if isinstance(test_string, unicode):
|
|
||||||
return_string = test_string
|
|
||||||
if not isinstance(test_string, unicode):
|
|
||||||
try:
|
|
||||||
return_string = unicode(test_string, u'utf-8')
|
|
||||||
except UnicodeError:
|
|
||||||
log.exception("Error encoding string to unicode")
|
|
||||||
return return_string
|
|
||||||
|
|
||||||
def get_uno_command():
|
def get_uno_command():
|
||||||
"""
|
"""
|
||||||
Returns the UNO command to launch an openoffice.org instance.
|
Returns the UNO command to launch an openoffice.org instance.
|
||||||
@ -510,5 +491,5 @@ from actions import ActionList
|
|||||||
|
|
||||||
__all__ = [u'AppLocation', u'get_application_version', u'check_latest_version',
|
__all__ = [u'AppLocation', u'get_application_version', u'check_latest_version',
|
||||||
u'add_actions', u'get_filesystem_encoding', u'LanguageManager',
|
u'add_actions', u'get_filesystem_encoding', u'LanguageManager',
|
||||||
u'ActionList', u'get_web_page', u'file_is_unicode', u'string_is_unicode',
|
u'ActionList', u'get_web_page', u'file_is_unicode', u'get_uno_command',
|
||||||
u'get_uno_command', u'get_uno_instance', u'delete_file']
|
u'get_uno_instance', u'delete_file']
|
||||||
|
Loading…
Reference in New Issue
Block a user