X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BaseTools%2FTests%2FCheckPythonSyntax.py;h=cc17ee0d258227c6ca954e92b352aab7274c0365;hb=9f3594782de9051cbf599f9af006903ed3f6669e;hp=61a048ad5d054b84c2be68c08fb231cdb3cc320b;hpb=f51461c829c124288a930829a78e2a5a799f4039;p=mirror_edk2.git
diff --git a/BaseTools/Tests/CheckPythonSyntax.py b/BaseTools/Tests/CheckPythonSyntax.py
index 61a048ad5d..cc17ee0d25 100644
--- a/BaseTools/Tests/CheckPythonSyntax.py
+++ b/BaseTools/Tests/CheckPythonSyntax.py
@@ -1,7 +1,7 @@
## @file
# Unit tests for checking syntax of Python source code
#
-# Copyright (c) 2009, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -29,7 +29,7 @@ class Tests(TestTools.BaseToolsTest):
def SingleFileTest(self, filename):
try:
py_compile.compile(filename, doraise=True)
- except Exception, e:
+ except Exception as e:
self.fail('syntax error: %s, Error is %s' % (filename, str(e)))
def MakePythonSyntaxCheckTests():
@@ -55,7 +55,7 @@ def MakePythonSyntaxCheckTests():
newmethod = lambda self: self.SingleFileTest(filename)
setattr(
Tests,
- test,
+ test,
newmethod
)