dfxp: fix syntax

This commit is contained in:
fnord 2015-07-17 03:05:24 -05:00
parent e6b0b86eb2
commit 8f057ac0bd

View File

@ -1850,13 +1850,11 @@ def dfxp2srt(dfxp_data):
'ttaf1': 'http://www.w3.org/2006/10/ttaf1', 'ttaf1': 'http://www.w3.org/2006/10/ttaf1',
}) })
def text_or_empty(v): def text_or_empty(v):
""" return string that contains something other than whitespace, or '' """ """ 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
def parse_node(node): def parse_node(node):
str_or_empty = functools.partial(str_or_none, default='') str_or_empty = functools.partial(str_or_none, default='')