From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Ezra Buehler <ezra@easyb.ch>
Cc: Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org, linux-integrity@vger.kernel.org,
Tadeusz Struk <tadeusz.struk@intel.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] selftests/tpm2: Change exception handling to be Python 3 compatible
Date: Mon, 13 Apr 2020 21:04:52 +0300 [thread overview]
Message-ID: <20200413180440.GA10917@linux.intel.com> (raw)
In-Reply-To: <531D50E8-E8FC-402E-9226-6000E8B6E960@easyb.ch>
On Mon, Apr 13, 2020 at 07:02:20AM +0200, Ezra Buehler wrote:
> Hi Jarkko,
>
> On 12 Apr 2020, at 19:07, Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> wrote:
> >
> > On Sun, Apr 12, 2020 at 05:02:27PM +0200, Ezra Buehler wrote:
> >> Hi Jarkkon,
> >>
> >>> On 12 Apr 2020, at 16:36, Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> wrote:
> >>> + except ProtocolError(e):
> >>
> >> Should this not be
> >>
> >> except ProtocolError as e:
> >
> > Unless there is a functional difference, does it matter?
> >
> > /Jarkko
>
> Well, your patch confuses me a lot. It looks to me like you are passing
> the undefined `e` variable to the constructor.
>
> When I run flake8 on it I get following error (among others):
>
> F821 undefined name 'e'
I don't know what flake8 is.
> What I suggested is the standard syntax:
> https://docs.python.org/3/tutorial/errors.html
It passed the Python 3 interpreter.
> Did you test this? You should get an error as soon as an exception
> occurs.
Yes. Interpreter did not complain. I did not know that the language
is broken that way that you have to exercise the code path to get
a syntax error.
/Jarkko
next prev parent reply other threads:[~2020-04-13 18:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-12 14:36 [PATCH] selftests/tpm2: Change exception handling to be Python 3 compatible Jarkko Sakkinen
2020-04-12 15:02 ` Ezra Buehler
2020-04-12 17:07 ` Jarkko Sakkinen
2020-04-13 5:02 ` Ezra Buehler
2020-04-13 18:04 ` Jarkko Sakkinen [this message]
2020-04-14 5:45 ` Ezra Buehler
2020-04-14 7:38 ` Jarkko Sakkinen
2020-04-14 11:14 ` Ezra Buehler
2020-04-14 16:05 ` Jarkko Sakkinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200413180440.GA10917@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=ezra@easyb.ch \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=tadeusz.struk@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.