File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 44"""Contains classes and functions that a SAML2.0 Identity provider (IdP)
55or attribute authority (AA) may use to conclude its tasks.
66"""
7- import dbm
87import importlib
98import logging
109import shelve
1110import threading
11+ from dbm import error as DbmError
1212
1313from saml2 import BINDING_HTTP_REDIRECT
1414from saml2 import class_name
5858def _shelve_compat (name , * args , ** kwargs ):
5959 try :
6060 return shelve .open (name , * args , ** kwargs )
61- except dbm .error [0 ]:
62- # Python 3 whichdb needs to try .db to determine type
63- if name .endswith (".db" ):
64- name = name .rsplit (".db" , 1 )[0 ]
65- return shelve .open (name , * args , ** kwargs )
66- else :
67- raise
61+ except DbmError :
62+ return shelve .open (name .removesuffix (".db" ), * args , ** kwargs )
6863
6964
7065class Server (Entity ):
You can’t perform that action at this time.
0 commit comments