Closed csouers closed 4 years ago
Nice catch, these examples are indeed not regularly tested, and this was archaic (python <=2.6) syntax that python 3 rightly rejects.
The fix is actually to change the comma into an as
: this code is trying to display the error which happened before exiting. Otherwise, this will just cause a NameError
as exc
will not be set.
Do you want to amend this commit ? If so, please make the commit message first line something like examples/hotplug_advanced.py: Fix syntax for python 3
or similar.
Otherwise, I will apply this fix, and try to find a way to get these examples to at least be checked for syntax in automated tests.
See latest rebase. (sorry for the close and reopen)
Thanks for the updated commit, it is now merged.
Is this the desired change?