File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1515# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717#
18- # $Id: __init__.py,v 1.31 2004-11-20 11:31:42 a1s Exp $
18+ # $Id: __init__.py,v 1.32 2004-11-29 02:07:59 anthonybaxter Exp $
1919
2020'''Container for the hyperdb storage backend implementations.
2121'''
@@ -43,11 +43,12 @@ def get_backend(name):
4343 try :
4444 module = __import__ (module_name , vars )
4545 except :
46- # import failed, but the (empty) module is already
47- # placed in sys.modules and package globals;
46+ # import failed, but in versions prior to 2.4, a (broken)
47+ # module is left in sys.modules and package globals;
4848 # next import would success although the module is unusable
49- del sys .modules ['.' .join ((__name__ , module_name ))]
50- del vars [module_name ]
49+ if sys .version_info < (2 , 4 ):
50+ del sys .modules ['.' .join ((__name__ , module_name ))]
51+ del vars [module_name ]
5152 raise
5253 else :
5354 vars [name ] = module
You can’t perform that action at this time.
0 commit comments