[Nut-upsdev] Fwd: [nut] PyNUT: Fix error when raising without an Exception. (#128)

Charles Lepple clepple at gmail.com
Wed Jun 4 02:20:09 UTC 2014


Hi David,

Any thoughts on either this pull request, or #129?

https://github.com/networkupstools/nut/pull/128
https://github.com/networkupstools/nut/pull/129

Also note the mention of the new Python module here:

https://github.com/george2/python-nut2/tree/development

- Charles

Begin forwarded message:

> From: george2 <notifications at github.com>
> Subject: [nut] PyNUT: Fix error when raising without an Exception. (#128)
> Date: June 3, 2014 3:34:00 PM EDT
> Raising without a valid exception is invalid:
> 
> >>> raise
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType
> >>> raise Exception
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> Exception
> 
> Changing this to "raise Exception" fixes this problem.
> 
> You can merge this Pull Request by running
> 
>   git pull https://github.com/george2/nut master
> Or view, comment on, or merge it at:
> 
>   https://github.com/networkupstools/nut/pull/128
> 
> Commit Summary
> 
> 	• Fix error when raising without an Exception.
> File Changes
> 
> 	• M scripts/python/module/PyNUT.py (2)
> Patch Links:
> 
>https://github.com/networkupstools/nut/pull/128.patch
>https://github.com/networkupstools/nut/pull/128.diff






More information about the Nut-upsdev mailing list