explain purpose of text_or_none

This commit is contained in:
fnord 2015-07-15 05:59:33 -05:00
parent 7db0a3d1bc
commit e6b0b86eb2

View File

@ -1852,6 +1852,7 @@ def dfxp2srt(dfxp_data):
def text_or_empty(v): def text_or_empty(v):
""" return string that contains something other than whitespace, or '' """
str = str_or_none(v, '') str = str_or_none(v, '')
return '' if not re.search(r'[^\s]',str,re.DOTALL) else str return '' if not re.search(r'[^\s]',str,re.DOTALL) else str