Opened 10 years ago

Closed 10 years ago

#1468 closed bug (Invalid)

Command line arguments are not parsed correctly

Reported by: cinderblock Owned by:
Priority: major Milestone: Future
Component: Console UI Version: 1.3.1
Keywords: command line args Cc: cinderblock

Description

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?

Change History (2)

comment:1 Changed 10 years ago by cinderblock

I hate to say it but I might have posted this bug a little hastily as I'm having trouble recreating this. I might have had a slight issue with extra quotes ("") that could have been causing this issue, though I've had other equivalent weird files created.

If anything, the paths deluged uses need to be unified. For instance, the .config/deluge directory gets placed in the user's home dir while the --pidfile and --logfile are placed relative to the current working directory.

comment:2 Changed 10 years ago by Cas

  • Component changed from core to console
  • Resolution set to invalid
  • Status changed from new to closed
  • Type changed from defect to bug

No one else has reported similar so I am closing this.

Note: See TracTickets for help on using tickets.