## @file\r
# Unit tests for checking syntax of Python source code\r
#\r
-# Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2018, 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
def SingleFileTest(self, filename):\r
try:\r
py_compile.compile(filename, doraise=True)\r
- except Exception, e:\r
+ except Exception as e:\r
self.fail('syntax error: %s, Error is %s' % (filename, str(e)))\r
\r
def MakePythonSyntaxCheckTests():\r
newmethod = lambda self: self.SingleFileTest(filename)\r
setattr(\r
Tests,\r
- test, \r
+ test,\r
newmethod\r
)\r
\r