Skip to contentSkip to conversation

Bitbake exception handling syntax.

DISCUSSION Scott Garman 2 participants 2 messages Jun 14, 2011 – Jun 15, 2011

lore
Share & tools
lore
#0 lore raw

In a failed attempt to make bitbake pass the parsing stage with python v3, I noticed that the syntax we use for exception handling is inconsistent.

The old way is to do: except ExcType, localvar
The new way is: except ExcType as localvar

We're using the new syntax (which is python v3.x compatible) throughout most of the code, so the patch I'm about to submit cleans up the remaining cases using the old syntax.

Scott

Signature · 3 lines
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center
#1 lore raw
Quoted 9 lines · Scott Garman

In a failed attempt to make bitbake pass the parsing stage with python v3, I noticed that the syntax we use for exception handling is inconsistent.

The old way is to do: except ExcType, localvar
The new way is: except ExcType as localvar

We're using the new syntax (which is python v3.x compatible) throughout most of the code, so the patch I'm about to submit cleans up the remaining cases using the old syntax.

That sounds good to me. I converted all of them at one point, but the code has changed since then :)

Signature · 5 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics