Skip to content

Commit 09e6bda

Browse files
author
Roland Hedberg
committed
Only import memcache if it's needed.
1 parent 21951d0 commit 09e6bda

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/saml2/server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import os
2323

2424
import shelve
25-
import memcache
25+
2626
from saml2.eptid import EptidShelve, Eptid
2727
from saml2.mongo_store import IdentMDB, SessionStorageMDB, EptidMDB
2828
from saml2.sdb import SessionStorage
@@ -116,6 +116,7 @@ def init_config(self, stype="idp"):
116116
if typ == "shelve":
117117
idb = shelve.open(addr, writeback=True)
118118
elif typ == "memcached":
119+
import memcache
119120
idb = memcache.Client(addr)
120121
elif typ == "dict": # in-memory dictionary
121122
idb = {}

0 commit comments

Comments
 (0)