summaryrefslogtreecommitdiff
path: root/src/engine/SCons/SConsign.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/SConsign.py')
-rw-r--r--src/engine/SCons/SConsign.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/engine/SCons/SConsign.py b/src/engine/SCons/SConsign.py
index e01026d..e003933 100644
--- a/src/engine/SCons/SConsign.py
+++ b/src/engine/SCons/SConsign.py
@@ -29,7 +29,7 @@ Writing and reading information to the .sconsign file or files.
from __future__ import print_function
-__revision__ = "src/engine/SCons/SConsign.py 103260fce95bf5db1c35fb2371983087d85dd611 2019-07-13 18:25:30 bdbaddog"
+__revision__ = "src/engine/SCons/SConsign.py e724ae812eb96f4858a132f5b8c769724744faf6 2019-07-21 00:04:47 bdeegan"
import SCons.compat
@@ -76,7 +76,8 @@ def Get_DataBase(dir):
except KeyError:
path = d.entry_abspath(DB_Name)
try: db = DataBase[d] = DB_Module.open(path, mode)
- except (IOError, OSError): pass
+ except (IOError, OSError):
+ pass
else:
if mode != "r":
DB_sync_list.append(db)
@@ -334,10 +335,15 @@ class DirFile(Dir):
Dir.__init__(self, fp, dir)
except KeyboardInterrupt:
raise
- except:
+ except Exception:
SCons.Warnings.warn(SCons.Warnings.CorruptSConsignWarning,
"Ignoring corrupt .sconsign file: %s"%self.sconsign)
+ try:
+ fp.close()
+ except AttributeError:
+ pass
+
global sig_files
sig_files.append(self)
@@ -417,7 +423,7 @@ def File(name, dbm_module=None):
else:
ForDirectory = DB
DB_Name = name
- if not dbm_module is None:
+ if dbm_module is not None:
DB_Module = dbm_module
# Local Variables: