swc-installation-test-2.py: Don't chain exceptions (yet)
authorW. Trevor King <wking@tremily.us>
Sun, 30 Dec 2012 17:36:44 +0000 (12:36 -0500)
committerW. Trevor King <wking@tremily.us>
Tue, 1 Jan 2013 14:49:46 +0000 (09:49 -0500)
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

index 3bec3e23194d5f0a60fb64af54cd9680f3b63276..a6a9a508d2e4e6bd5012a7629fa7d33593873e52 100755 (executable)
@@ -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: