def _get_query_parts(self, query_str, search_options=None):
if search_options is None:<EOL><INDENT>search_options = {}<EOL><DEDENT>if query_str is None:<EOL><INDENT>raise NipapValueError("<STR_LIT>")<EOL><DEDENT>query_str_parts = []<EOL>try:<EOL><INDENT>for part in shlex.split(query_str.encode('<STR_LIT:utf-8>')):<EOL><INDENT>query_str_parts.append({ '<STR_LIT:string>': part.decode('<STR_LIT:utf-8>') })<EOL><DEDENT><DEDENT>except ValueError as exc:<EOL><INDENT>if unicode(exc) == '<STR_LIT>':<EOL><INDENT>raise NipapValueError(unicode(exc))<EOL><DEDENT>raise exc<EOL><DEDENT>if len(query_str_parts) == <NUM_LIT:0>:<EOL><INDENT>query_str_parts.append({ '<STR_LIT:string>': '<STR_LIT>' })<EOL><DEDENT>return query_str_parts<EOL>
Split a query string into its parts