#3647: deluge console errors on addition of torrent with semicolon (`;`) in name
-----------------------------+----------------------------
  Reporter:  iconoclasthero  |      Owner:  (none)
      Type:  bug             |     Status:  new
  Priority:  minor           |  Milestone:  needs verified
 Component:  Unknown         |    Version:  2.0.5
Resolution:                  |   Keywords:
-----------------------------+----------------------------
Comment (by iconoclasthero):

 Also this fails...
 {{{
 $ deluge-console "connect $delugehost:$delugeport $delugeuser $delugepass;
 add -p ${linked@Q} \"${torrentfile//\;/\\\;}\""
 Traceback (most recent call last):
   File "/home/user/.local/bin/deluge-console", line 8, in <module>
     sys.exit(start())
              ^^^^^^^
   File "/home/user/.local/share/pipx/venvs/deluge/lib/python3.12/site-
 packages/deluge/ui/console/__init__.py", line 16, in start
     return Console().start()
            ^^^^^^^^^^^^^^^^^
   File "/home/user/.local/share/pipx/venvs/deluge/lib/python3.12/site-
 packages/deluge/ui/console/console.py", line 148, in start
     super().start(self.console_parser)
   File "/home/user/.local/share/pipx/venvs/deluge/lib/python3.12/site-
 packages/deluge/ui/ui.py", line 64, in start
     self.__options = self.parse_args(parser, args)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/home/user/.local/share/pipx/venvs/deluge/lib/python3.12/site-
 packages/deluge/ui/ui.py", line 43, in parse_args
     options = parser.parse_args(args)
               ^^^^^^^^^^^^^^^^^^^^^^^
   File "/home/user/.local/share/pipx/venvs/deluge/lib/python3.12/site-
 packages/deluge/ui/console/parser.py", line 73, in parse_args
     multi_command = self._split_args(args)
                     ^^^^^^^^^^^^^^^^^^^^^^
   File "/home/user/.local/share/pipx/venvs/deluge/lib/python3.12/site-
 packages/deluge/ui/console/parser.py", line 50, in _split_args
     cmds = shlex.split(cmd_line)
            ^^^^^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3.12/shlex.py", line 313, in split
     return list(lex)
            ^^^^^^^^^
   File "/usr/lib/python3.12/shlex.py", line 300, in __next__
     token = self.get_token()
             ^^^^^^^^^^^^^^^^
   File "/usr/lib/python3.12/shlex.py", line 109, in get_token
     raw = self.read_token()
           ^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3.12/shlex.py", line 210, in read_token
     raise ValueError("No escaped character")
 ValueError: No escaped character
 }}}

 defining "$torrentfile" as also does not work:
 {{{
 torrentfile=/library/torrent/Last1\,\ First1\;\ Last2\,\ First2\ --\
 Title\,\ 3_e\ \(1989\,\ 2016\).torrent
 }}}
-- 
Ticket URL: <http://dev.deluge-torrent.org/ticket/3647#comment:3>
Deluge <https://deluge-torrent.org/>
Deluge Project

-- 
You received this message because you are subscribed to the Google Groups 
"Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/deluge-dev/068.8ea137fe5ab677d00ad6f58ad0928fc3%40deluge-torrent.org.

Reply via email to