Blob Blame History Raw
From 0def5f5e160f6ebdf766d956721b70c26372a0b6 Mon Sep 17 00:00:00 2001
From: Petr Vobornik <pvoborni@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

Reviewed-By: Tomas Babej <tbabej@redhat.com>
---
 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