# 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
\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
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
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
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