diff options
Diffstat (limited to 'src/script/sconsign.py')
-rw-r--r-- | src/script/sconsign.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/script/sconsign.py b/src/script/sconsign.py index 13fac98..239979f 100644 --- a/src/script/sconsign.py +++ b/src/script/sconsign.py @@ -186,10 +186,12 @@ sys.path = libs + sys.path import SCons.compat -import whichdb +try: + import whichdb + whichdb = whichdb.whichdb +except ImportError as e: + from dbm import whichdb -# was added for py3, but breaks py2 on windows.. -#import dbm import time import pickle import imp @@ -209,8 +211,8 @@ def my_whichdb(filename): # Should work on python2 -_orig_whichdb = whichdb.whichdb -whichdb.whichdb = my_whichdb +_orig_whichdb = whichdb +whichdb = my_whichdb # was changed for python3 #_orig_whichdb = whichdb.whichdb @@ -531,9 +533,7 @@ if Do_Call: Do_Call(a) else: for a in args: - # changed for py3 compat, broke py2 on windows - # dbm_name = dbm.whichdb(a) - dbm_name = whichdb.whichdb(a) + dbm_name = whichdb(a) if dbm_name: Map_Module = {'SCons.dblite' : 'dblite'} if dbm_name != "SCons.dblite": |