From owner-svn-src-user@freebsd.org  Sat Apr 20 16:05:06 2019
Return-Path: <owner-svn-src-user@freebsd.org>
Delivered-To: svn-src-user@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id D93B1156BA0C
 for <svn-src-user@mailman.ysv.freebsd.org>;
 Sat, 20 Apr 2019 16:05:05 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (4096 bits) client-digest SHA256)
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 7818096C95;
 Sat, 20 Apr 2019 16:05:05 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 526D21867E;
 Sat, 20 Apr 2019 16:05:05 +0000 (UTC)
 (envelope-from ngie@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3KG55vI051304;
 Sat, 20 Apr 2019 16:05:05 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3KG55Q2051303;
 Sat, 20 Apr 2019 16:05:05 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201904201605.x3KG55Q2051303@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Enji Cooper <ngie@FreeBSD.org>
Date: Sat, 20 Apr 2019 16:05:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-user@freebsd.org
Subject: svn commit: r346447 - user/ngie/bug-237403/tests/sys/opencrypto
X-SVN-Group: user
X-SVN-Commit-Author: ngie
X-SVN-Commit-Paths: user/ngie/bug-237403/tests/sys/opencrypto
X-SVN-Commit-Revision: 346447
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 7818096C95
X-Spamd-Bar: --
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-2.98 / 15.00];
 local_wl_from(0.00)[FreeBSD.org];
 NEURAL_HAM_MEDIUM(-1.00)[-0.999,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0];
 NEURAL_HAM_SHORT(-0.98)[-0.984,0];
 ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]
X-BeenThere: svn-src-user@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the experimental &quot; user&quot;
 src tree" <svn-src-user.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-user/>
List-Post: <mailto:svn-src-user@freebsd.org>
List-Help: <mailto:svn-src-user-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-user>,
 <mailto:svn-src-user-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 20 Apr 2019 16:05:06 -0000

Author: ngie
Date: Sat Apr 20 16:05:04 2019
New Revision: 346447
URL: https://svnweb.freebsd.org/changeset/base/346447

Log:
  Use py3 compatible method for catching exceptions
  
  Now ancient versions of python used to support catching exceptions in the form
  `except Exception, exception_object`. This support was removed in py3 (and
  introduced preemptively in earlier 2.x versions), being replaced by the form
  `except Exception as exception_object`.

Modified:
  user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py

Modified: user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py
==============================================================================
--- user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py	Sat Apr 20 16:01:04 2019	(r346446)
+++ user/ngie/bug-237403/tests/sys/opencrypto/cryptotest.py	Sat Apr 20 16:05:04 2019	(r346447)
@@ -113,7 +113,7 @@ def GenTestCase(cname):
                             cipherkey,
                             mac=self._gmacsizes[len(cipherkey)],
                             mackey=cipherkey, crid=crid)
-                    except EnvironmentError, e:
+                    except EnvironmentError as e:
                         # Can't test algorithms the driver does not support.
                         if e.errno != errno.EOPNOTSUPP:
                             raise
@@ -122,7 +122,7 @@ def GenTestCase(cname):
                     if mode == 'ENCRYPT':
                         try:
                             rct, rtag = c.encrypt(pt, iv, aad)
-                        except EnvironmentError, e:
+                        except EnvironmentError as e:
                             # Can't test inputs the driver does not support.
                             if e.errno != errno.EINVAL:
                                 raise
@@ -142,7 +142,7 @@ def GenTestCase(cname):
                         else:
                             try:
                                 rpt, rtag = c.decrypt(*args)
-                            except EnvironmentError, e:
+                            except EnvironmentError as e:
                                 # Can't test inputs the driver does not support.
                                 if e.errno != errno.EINVAL:
                                     raise
@@ -210,7 +210,7 @@ def GenTestCase(cname):
                     try:
                         c = Crypto(meth, cipherkey, crid=crid)
                         r = curfun(c, pt, iv)
-                    except EnvironmentError, e:
+                    except EnvironmentError as e:
                         # Can't test hashes the driver does not support.
                         if e.errno != errno.EOPNOTSUPP:
                             raise
@@ -309,7 +309,7 @@ def GenTestCase(cname):
                     try:
                         c = Crypto(mac=alg, mackey=key,
                             crid=crid)
-                    except EnvironmentError, e:
+                    except EnvironmentError as e:
                         # Can't test hashes the driver does not support.
                         if e.errno != errno.EOPNOTSUPP:
                             raise