# 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
\r
-# Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\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
SYS_ENV_ERR = "ERROR : %s system environment variable must be set prior to running this tool.\n"\r
\r
__execname__ = "UpdateBuildVersions.py"\r
-SVN_REVISION = "$Revision: 3 $"\r
-SVN_REVISION = SVN_REVISION.replace("$Revision:", "").replace("$", "").strip()\r
+SVN_REVISION = "$LastChangedRevision: 3 $"\r
+SVN_REVISION = SVN_REVISION.replace("$LastChangedRevision:", "").replace("$", "").strip()\r
__copyright__ = "Copyright (c) 2014, Intel Corporation. All rights reserved."\r
VERSION_NUMBER = "0.7.0"\r
__version__ = "Version %s.%s" % (VERSION_NUMBER, SVN_REVISION)\r
sys.stderr.flush()\r
returnValue = err_val.returncode\r
\r
- except IOError as (errno, strerror):\r
+ except IOError as err_val:\r
+ (errno, strerror) = err_val.args\r
file_list.close()\r
if not Opt.silent:\r
sys.stderr.write("I/O ERROR : %s : %s\n" % (str(errno), strerror))\r
sys.stderr.flush()\r
returnValue = errno\r
\r
- except OSError as (errno, strerror):\r
+ except OSError as err_val:\r
+ (errno, strerror) = err_val.args\r
file_list.close()\r
if not Opt.silent:\r
sys.stderr.write("OS ERROR : %s : %s\n" % (str(errno), strerror))\r
sys.stderr.write("Subprocess ERROR : %s\n" % err_val)\r
sys.stderr.flush()\r
\r
- except IOError as (errno, strerror):\r
+ except IOError as err_val:\r
+ (errno, strerror) = err_val.args\r
if not Opt.silent:\r
sys.stderr.write("I/O ERROR : %d : %s\n" % (str(errno), strerror))\r
sys.stderr.write("ERROR : this command failed : %s\n" % CmdLine)\r
sys.stderr.flush()\r
\r
- except OSError as (errno, strerror):\r
+ except OSError as err_val:\r
+ (errno, strerror) = err_val.args\r
if not Opt.silent:\r
sys.stderr.write("OS ERROR : %d : %s\n" % (str(errno), strerror))\r
sys.stderr.write("ERROR : this command failed : %s\n" % CmdLine)\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