ipaserver_setup_http: Only use tasks.restore_context for old releases

tasks.restore_context is only used in old releases. The existence of
paths.CACHE_IPA_SESSIONS is used to determine if the call needs to be
done or not.
This commit is contained in:
Thomas Woerner
2019-06-07 17:39:41 +02:00
parent 46925086b7
commit df65de902d

View File

@@ -183,7 +183,8 @@ def main():
subject_base=options.subject_base,
auto_redirect=not options.no_ui_redirect,
ca_is_configured=options.setup_ca)
tasks.restore_context(paths.CACHE_IPA_SESSIONS)
if hasattr(paths, "CACHE_IPA_SESSIONS"):
tasks.restore_context(paths.CACHE_IPA_SESSIONS)
ca.set_subject_base_in_config(options.subject_base)