def _determine_error_message(remainder):
 match = BAD_QUOTED_PARAM_RE.match(remainder)
 if match:
  if match.group(1):
   return u'Space expected after closing \'"\''
  else:
   return u'Missing closing \'"\''
 return u'Invalid unquoted character'

def _determine_error_message ( remainder ) : match = BAD_QUOTED_PARAM_RE . match ( remainder ) if match : if match . group ( 1 ) : return u'Space expected after closing \'"\'' else : return u'Missing closing \'"\'' return u'Invalid unquoted character'
helper to emulate mpd errors .