]> jfr.im git - erebus.git/blobdiff - modlib.py
urls: add content-length and content-type
[erebus.git] / modlib.py
index 51018f4bd424113bdbb378667dd0f56e83d745bc..ee94e9ee38679a7dd928a89a9b69c1c40677645c 100644 (file)
--- a/modlib.py
+++ b/modlib.py
@@ -121,6 +121,9 @@ class modlib(object):
                        if isinstance(cmd, stringbase):
                                cmd = (cmd,)
 
+                       if clevel > self.PUBLIC and not needchan:
+                               raise Exception('clevel must be left at default if needchan is False')
+
                        func.needchan = needchan
                        func.wantchan = wantchan
                        func.reqglevel = glevel