From 749bddffc9981b5212abba476f1323736c156f9b Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 30 Dec 2012 12:36:44 -0500 Subject: [PATCH] swc-installation-test-2.py: Don't chain exceptions (yet) Exception chaining (PEP 3134, 'raise ... from') raises SyntaxErros in Python 2.x. Comment the chaining out until SWC starts teaching only Python 3.x. --- swc-installation-test-2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/swc-installation-test-2.py b/swc-installation-test-2.py index 3bec3e2..a6a9a50 100755 --- a/swc-installation-test-2.py +++ b/swc-installation-test-2.py @@ -200,7 +200,7 @@ class Dependency (object): try: parsed_version.append(int(part)) except ValueError as e: - raise NotImplementedError((version, part)) from e + raise NotImplementedError((version, part))# from e return tuple(parsed_version) @@ -248,7 +248,7 @@ class CommandDependency (Dependency): raise DependencyError( checker=self, message="could not find '{0}' executable".format(command), - ) from e + )# from e stdout,stderr = p.communicate() status = p.wait() if status: @@ -322,7 +322,7 @@ class PythonPackageDependency (Dependency): checker=self, message="could not import the '{0}' package".format( self.package), - ) from e + )# from e try: version = package.__version__ except AttributeError: -- 2.26.2