summaryrefslogtreecommitdiff
path: root/engine/SCons/SConsign.py
diff options
context:
space:
mode:
Diffstat (limited to 'engine/SCons/SConsign.py')
-rw-r--r--engine/SCons/SConsign.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/engine/SCons/SConsign.py b/engine/SCons/SConsign.py
index 1fec6a0..e003933 100644
--- a/engine/SCons/SConsign.py
+++ b/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 a56bbd8c09fb219ab8a9673330ffcd55279219d0 2019-03-26 23:16:31 bdeegan"
+__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: