From: W. Trevor King Date: Sun, 30 Dec 2012 17:36:44 +0000 (-0500) Subject: swc-installation-test-2.py: Don't chain exceptions (yet) X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=749bddffc9981b5212abba476f1323736c156f9b;p=swc-boot-camp.git 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. --- 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: