Fixes regression caused by cd3ca94ff2ef738cb3a9eae502193413058f976d.

Which caused:
* client installation failure (missing memcache)
* invalid warning in CLI on server

https://fedorahosted.org/freeipa/ticket/5133
--
Petr Vobornik
From 2a814456b7c143bc2f2f23d4706ec0543bf66ae3 Mon Sep 17 00:00:00 2001
From: Petr Vobornik <pvobo...@redhat.com>
Date: Thu, 16 Jul 2015 10:17:26 +0200
Subject: [PATCH] do not import memcache on client

Fixes regression caused by cd3ca94ff2ef738cb3a9eae502193413058f976d.

Which caused:
* client installation failure (missing memcache)
* invalid warning in CLI on server

https://fedorahosted.org/freeipa/ticket/5133
---
 ipalib/plugins/session.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ipalib/plugins/session.py b/ipalib/plugins/session.py
index 3fd566d3224a13b5fbaa4450f02855329a13bc4c..b03b6b41032ab7f00ff9b75e23b5f998353a7ea5 100644
--- a/ipalib/plugins/session.py
+++ b/ipalib/plugins/session.py
@@ -2,11 +2,13 @@
 # Copyright (C) 2015  FreeIPA Contributors see COPYING for license
 #
 
-from ipalib import Command
+from ipalib import api, Command
 from ipalib.request import context
-from ipalib.session import session_mgr
 from ipalib.plugable import Registry
 
+if api.env.in_server:
+    from ipalib.session import session_mgr
+
 register = Registry()
 
 
-- 
2.4.3

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to