summaryrefslogtreecommitdiff
path: root/engine/SCons/Tool/MSCommon/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'engine/SCons/Tool/MSCommon/common.py')
-rw-r--r--engine/SCons/Tool/MSCommon/common.py35
1 files changed, 4 insertions, 31 deletions
diff --git a/engine/SCons/Tool/MSCommon/common.py b/engine/SCons/Tool/MSCommon/common.py
index a7bc407..59296c2 100644
--- a/engine/SCons/Tool/MSCommon/common.py
+++ b/engine/SCons/Tool/MSCommon/common.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001 - 2015 The SCons Foundation
+# Copyright (c) 2001 - 2016 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/MSCommon/common.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog"
+__revision__ = "src/engine/SCons/Tool/MSCommon/common.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog"
__doc__ = """
Common helper functions for working with the Microsoft tool chain.
@@ -93,7 +93,7 @@ def has_reg(value):
try:
SCons.Util.RegOpenKeyEx(SCons.Util.HKEY_LOCAL_MACHINE, value)
ret = True
- except WindowsError:
+ except SCons.Util.WinError:
ret = False
return ret
@@ -180,7 +180,7 @@ def get_output(vcbat, args = None, env = None):
stdout = popen.stdout.read()
stderr = popen.stderr.read()
- # Extra debug logic, uncomment if necessar
+ # Extra debug logic, uncomment if necessary
# debug('get_output():stdout:%s'%stdout)
# debug('get_output():stderr:%s'%stderr)
@@ -226,33 +226,6 @@ def parse_output(output, keep = ("INCLUDE", "LIB", "LIBPATH", "PATH")):
return dkeep
-# TODO(sgk): unused
-def output_to_dict(output):
- """Given an output string, parse it to find env variables.
-
- Return a dict where keys are variables names, and values their content"""
- envlinem = re.compile(r'^([a-zA-z0-9]+)=([\S\s]*)$')
- parsedenv = {}
- for line in output.splitlines():
- m = envlinem.match(line)
- if m:
- parsedenv[m.group(1)] = m.group(2)
- return parsedenv
-
-# TODO(sgk): unused
-def get_new(l1, l2):
- """Given two list l1 and l2, return the items in l2 which are not in l1.
- Order is maintained."""
-
- # We don't try to be smart: lists are small, and this is not the bottleneck
- # is any case
- new = []
- for i in l2:
- if i not in l1:
- new.append(i)
-
- return new
-
# Local Variables:
# tab-width:4
# indent-tabs-mode:nil