Commit 50a435e9 authored by Jameson Rollins's avatar Jameson Rollins

system: exclude specifying INIT as initila request state

INIT behavior is different than other states, and is not intended to be set
as a fixed request state.  Throw error on attempt to set it as initial
request.
parent 833e2cb4
......@@ -463,6 +463,8 @@ class GuardSystem(object):
raise GuardSystemLoadError("unknown initial request state: %s" % module.request)
if not self.is_request(module.request):
raise GuardSystemLoadError("initial request state must be requestable (request=True): %s" % module.request)
if module.request == 'INIT':
raise GuardSystemLoadError("INIT may not be used as the initial request")
self._initial_request = module.request
else:
self._initial_request = None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment