Skip to content

Commit

Permalink
Fix to split options
Browse files Browse the repository at this point in the history
  • Loading branch information
massongit committed Nov 26, 2017
1 parent ba4a0cf commit 0e01002
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions natto/option_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
'''Helper class for parsing MeCab options.'''
import argparse
import logging
import shlex

from .support import string_support

logger = logging.getLogger('natto.option_parse')
Expand Down Expand Up @@ -150,7 +148,7 @@ def error(self, message):
help='set cost factor (default 700)',
action='store', dest='cost_factor', type=int)

opts = p.parse_args(shlex.split(options))
opts = p.parse_args([o.replace('\"', '').replace('\'', '') for o in options.split()])

for name in iter(list(self._SUPPORTED_OPTS.values())):
if hasattr(opts, name):
Expand Down

0 comments on commit 0e01002

Please sign in to comment.