Show an error message when trying to do an operation while disconnected from a deluge daemon.
This commit is contained in:
parent
72cb14f1d7
commit
76da1ac525
|
@ -25,6 +25,7 @@ deluge-shell: Deluge shell.
|
|||
|
||||
import deluge.ui.client as client
|
||||
import deluge.common as common
|
||||
import deluge.error
|
||||
import readline
|
||||
import logging
|
||||
|
||||
|
@ -338,7 +339,13 @@ class NullUI:
|
|||
commands['help'].execute([])
|
||||
else:
|
||||
command = commands[cmd]
|
||||
try:
|
||||
command.execute(inp)
|
||||
client.force_call()
|
||||
except deluge.error.NoCoreError, e:
|
||||
print "*** Operation failed. You are not connected to a deluge daemon."
|
||||
print " Perhaps you want to 'connect' first."
|
||||
print ""
|
||||
|
||||
print "Thanks."
|
||||
|
||||
|
|
Loading…
Reference in New Issue