aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2020-01-24 15:35:05 +0000
committerGravatar jesopo2020-01-24 15:35:05 +0000
commitdef6a019d64c52c0793777b8ea47db55efeb4604 (patch)
tree2a0aea99d58e7f9be3a204bc0b841fc16e25592f
parentutils.parse.timed_args() min_args should be optional (diff)
signature
don't args[0] for rchannel when [], better rchannel error
-rw-r--r--src/core_modules/command_spec.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core_modules/command_spec.py b/src/core_modules/command_spec.py
index 405d346b..9a3c7943 100644
--- a/src/core_modules/command_spec.py
+++ b/src/core_modules/command_spec.py
@@ -17,11 +17,13 @@ class Module(ModuleManager.BaseModule):
elif type == "rchannel":
if channel:
chunk = channel
- else:
+ elif args:
n = 1
if args[0] in server.channels:
chunk = server.channels.get(args[0])
- error = "No such channel"
+ error = "No such channel"
+ else:
+ error = "No channel provided"
elif type == "channel" and args:
if args[0] in server.channels:
chunk = server.channels.get(args[0])