Skip to content

Commit

Permalink
Fix CommaLexer
Browse files Browse the repository at this point in the history
  • Loading branch information
kannibalox committed Oct 11, 2018
1 parent 565ea1b commit 666c707
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pyrocore/torrent/rtorrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class CommaLexer(shlex.shlex):
"""Helper to split argument lists."""

def __init__(self, text):
shlex.shlex.__init__(self, fmt.to_utf8(text), None, True)
shlex.shlex.__init__(self, text, None, True)
self.whitespace += ','
self.whitespace_split = True
self.commenters = ''
Expand Down Expand Up @@ -356,7 +356,7 @@ def execute(self, commands):
for command in commands:
try:
method, args = command.split('=', 1)
args = tuple(CommaLexer(args.decode("utf-8")))
args = tuple(CommaLexer(args))
except (ValueError, TypeError) as exc:
raise error.UserError("Bad command %r, probably missing a '=' (%s)" % (command, exc))

Expand Down

0 comments on commit 666c707

Please sign in to comment.