]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Scripts/UpdateBuildVersions.py
BaseTools: Remove deprecated Visual Studio Option
[mirror_edk2.git] / BaseTools / Scripts / UpdateBuildVersions.py
index fb61b89bfb4c55c9012160e56f0509abf0bae35e..0f019f25cf50ea2529a1f7bee1274cc8a638e863 100755 (executable)
@@ -4,17 +4,11 @@
 # This script will modife the C/Include/Common/BuildVersion.h file and the two\r
 # Python scripts, Python/Common/BuildVersion.py and Python/UPT/BuildVersion.py.\r
 # If SVN is available, the tool will obtain the current checked out version of\r
-# the source tree for including the the --version commands.\r
+# the source tree for including the --version commands.\r
 \r
 #  Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>\r
 #\r
-#  This program and the accompanying materials\r
-#  are licensed and made available under the terms and conditions of the BSD License\r
-#  which accompanies this distribution.  The full text of the license may be found at\r
-#  http://opensource.org/licenses/bsd-license.php\r
-#\r
-#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 ##\r
 """ This program will update the BuildVersion.py and BuildVersion.h files used to set a tool's version value """\r
 from __future__ import absolute_import\r
@@ -73,7 +67,7 @@ def ParseOptions():
 \r
 \r
 def ShellCommandResults(CmdLine, Opt):\r
-    """ Execute the comand, returning the output content """\r
+    """ Execute the command, returning the output content """\r
     file_list = NamedTemporaryFile(delete=False)\r
     filename = file_list.name\r
     Results = []\r
@@ -253,7 +247,7 @@ def GetSvnRevision(opts):
     StatusCmd = "svn st -v --depth infinity --non-interactive"\r
     contents = ShellCommandResults(StatusCmd, opts)\r
     os.chdir(Cwd)\r
-    if type(contents) is ListType:\r
+    if isinstance(contents, ListType):\r
         for line in contents:\r
             if line.startswith("M "):\r
                 Modified = True\r
@@ -263,7 +257,7 @@ def GetSvnRevision(opts):
     InfoCmd = "svn info %s" % SrcPath.replace("\\", "/").strip()\r
     Revision = 0\r
     contents = ShellCommandResults(InfoCmd, opts)\r
-    if type(contents) is IntType:\r
+    if isinstance(contents, IntType):\r
         return 0, Modified\r
     for line in contents:\r
         line = line.strip()\r
@@ -284,7 +278,7 @@ def CheckSvn(opts):
     VerCmd = "svn --version"\r
     contents = ShellCommandResults(VerCmd, opts)\r
     opts.silent = OriginalSilent\r
-    if type(contents) is IntType:\r
+    if isinstance(contents, IntType):\r
         if opts.verbose:\r
             sys.stdout.write("SVN does not appear to be available.\n")\r
             sys.stdout.flush()\r