Ticket #1468 (closed bug: invalid)
Command line arguments are not parsed correctly
|Reported by:||cinderblock||Owned by:|
|Keywords:||command line args||Cc:||cinderblock|
I've been trying to get deluged to integrate better with my init scripts on a seedbox. Part of that setup is software creating a pid file. The command line arguments for deluged have such an option, which works fine.
The problem is when you add other command line arguments like a logfile and loglevel. I haven't explored this much, but if I start deluged like this:
$ deluged --logfile=deluged.log --loglevel=debug --pidfile=/var/run/deluged.pid
it creates a log file, in a couple directories...
deluged.log\ --loglevel=debug\ --pidfile=/var/run/deluged.pid
or, one line per directory...
deluged.log --loglevel=debug --pidfile=/ deluged.log --loglevel=debug --pidfile=/var/ deluged.log --loglevel=debug --pidfile=/var/run/ deluged.log --loglevel=debug --pidfile=/var/run/deluged.pid
Obviously this is a problem with how the argument parser handles strings with spaces in them.
I tried to look into the code in optparse.py but can't follow what is going on for the life of me. Isn't there some off the shelf and tested argument parser that can replace it?