summaryrefslogtreecommitdiff
path: root/engine/SCons/Tool/MSCommon/sdk.py
diff options
context:
space:
mode:
authorLuca Falavigna <dktrkranz@debian.org>2010-06-15 09:21:32 +0000
committerLuca Falavigna <dktrkranz@debian.org>2010-06-15 09:21:32 +0000
commit340d57481935334465037d97c0db1555b70c0eb1 (patch)
tree8396a9a52eed6e40268c1916bcfa8957dddef71c /engine/SCons/Tool/MSCommon/sdk.py
parent86baccee0a1dddf43f7eefe48e2d9e9037468b9c (diff)
Imported Upstream version 2.0.0upstream/2.0.0
Diffstat (limited to 'engine/SCons/Tool/MSCommon/sdk.py')
-rw-r--r--engine/SCons/Tool/MSCommon/sdk.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/engine/SCons/Tool/MSCommon/sdk.py b/engine/SCons/Tool/MSCommon/sdk.py
index 54be8ca..6debeb6 100644
--- a/engine/SCons/Tool/MSCommon/sdk.py
+++ b/engine/SCons/Tool/MSCommon/sdk.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/MSCommon/sdk.py 4720 2010/03/24 03:14:11 jars"
+__revision__ = "src/engine/SCons/Tool/MSCommon/sdk.py 5023 2010/06/14 22:05:46 scons"
__doc__ = """Module to detect the Platform/Windows SDK
@@ -58,7 +58,7 @@ _CURINSTALLED_SDK_HKEY_ROOT = \
r"Software\Microsoft\Microsoft SDKs\Windows\CurrentInstallFolder"
-class SDKDefinition:
+class SDKDefinition(object):
"""
An abstract base class for trying to find installed SDK directories.
"""
@@ -131,7 +131,7 @@ class WindowsSDK(SDKDefinition):
"""
HKEY_FMT = r'Software\Microsoft\Microsoft SDKs\Windows\v%s\InstallationFolder'
def __init__(self, *args, **kw):
- apply(SDKDefinition.__init__, (self,)+args, kw)
+ SDKDefinition.__init__(self, *args, **kw)
self.hkey_data = self.version
class PlatformSDK(SDKDefinition):
@@ -140,7 +140,7 @@ class PlatformSDK(SDKDefinition):
"""
HKEY_FMT = r'Software\Microsoft\MicrosoftSDK\InstalledSDKS\%s\Install Dir'
def __init__(self, *args, **kw):
- apply(SDKDefinition.__init__, (self,)+args, kw)
+ SDKDefinition.__init__(self, *args, **kw)
self.hkey_data = self.uuid
#
@@ -310,9 +310,9 @@ def get_cur_sdk_dir_from_reg():
return val
def get_sdk_by_version(mssdk):
- if not SupportedSDKMap.has_key(mssdk):
+ if mssdk not in SupportedSDKMap:
msg = "SDK version %s is not supported" % repr(mssdk)
- raise SCons.Errors.UserError, msg
+ raise SCons.Errors.UserError(msg)
get_installed_sdks()
return InstalledSDKMap.get(mssdk)
@@ -328,22 +328,22 @@ def get_default_sdk():
def mssdk_setup_env(env):
debug('sdk.py:mssdk_setup_env()')
- if env.has_key('MSSDK_DIR'):
+ if 'MSSDK_DIR' in env:
sdk_dir = env['MSSDK_DIR']
if sdk_dir is None:
return
sdk_dir = env.subst(sdk_dir)
debug('sdk.py:mssdk_setup_env: Using MSSDK_DIR:%s'%sdk_dir)
- elif env.has_key('MSSDK_VERSION'):
+ elif 'MSSDK_VERSION' in env:
sdk_version = env['MSSDK_VERSION']
if sdk_version is None:
msg = "SDK version %s is not installed" % repr(mssdk)
- raise SCons.Errors.UserError, msg
+ raise SCons.Errors.UserError(msg)
sdk_version = env.subst(sdk_version)
mssdk = get_sdk_by_version(sdk_version)
sdk_dir = mssdk.get_sdk_dir()
debug('sdk.py:mssdk_setup_env: Using MSSDK_VERSION:%s'%sdk_dir)
- elif env.has_key('MSVS_VERSION'):
+ elif 'MSVS_VERSION' in env:
msvs_version = env['MSVS_VERSION']
debug('sdk.py:mssdk_setup_env:Getting MSVS_VERSION from env:%s'%msvs_version)
if msvs_version is None:
@@ -382,7 +382,7 @@ def mssdk_exists(version=None):
sdks = get_installed_sdks()
if version is None:
return len(sdks) > 0
- return sdks.has_key(version)
+ return version in sdks
# Local Variables:
# tab-width:4