Page 1 of 1

deluge-console innapropriate exit status.

Posted: Mon Feb 09, 2015 10:24 am
by callmeclean
I'm currently writing a script that will be automatically assigning a listen port to deluged based on another input. I am using the command:

Code: Select all

deluge-console "config -s listen_ports (portnumber,portnumber)"
Sometimes the input I am getting won't be a correctly formatted port number, so I will need to rerun the script if this is the case. I was hoping on simply using the exit status of the deluge-console command above. However when an incorrectly formatted variable is used as the portnumber, and lots of error lines involving SyntaxError: malformed expression are spewed out, it still returns the exit status of 0 for successful. Where I was hoping it would be a non-zero number to indicate failure. I use the following command after execution to get exit status:

Code: Select all

echo $?
I am using deluged: 1.3.3 with libtorrent: 0.15.10.0 on raspbian (Debian variant).
Is this an issue that has been fixed in the latest version of deluge? Is it actually working in my version and I am just missing something? Also if this is still an issue, is there a support ticket for it (I couldn't find one) or should one be put up?

Thanks for any help!