From owner-svn-src-user@freebsd.org Tue Sep 3 14:07:13 2019 Return-Path: Delivered-To: svn-src-user@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EA0A7DD6A2 for ; Tue, 3 Sep 2019 14:07:12 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46N80J45flz4QMQ; Tue, 3 Sep 2019 14:07:12 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1452) id 15D241B27A; Tue, 3 Sep 2019 14:06:32 +0000 (UTC) X-Original-To: yuripv@localmail.freebsd.org Delivered-To: yuripv@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 58FE4D97C; Sat, 20 Apr 2019 16:05:08 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2710696C98; Sat, 20 Apr 2019 16:05:08 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 538) id 0E282D97B; Sat, 20 Apr 2019 16:05:08 +0000 (UTC) Delivered-To: src-committers@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id ACFE4D979 for ; 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 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 Precedence: bulk X-Loop: FreeBSD.org Sender: owner-src-committers@freebsd.org X-Rspamd-Queue-Id: 2710696C98 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US] Status: O X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.29 List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Tue, 03 Sep 2019 14:07:13 -0000 X-Original-Date: Sat, 20 Apr 2019 16:05:05 +0000 (UTC) X-List-Received-Date: Tue, 03 Sep 2019 14:07:13 -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