New submission from terry:

The attached code generates this output:

init called
finished init
init called
finished init
init called
finished init
initPorts done
alldone
destroying /sys/class/gpio/gpio16/
destroying /sys/class/gpio/gpio6/
Exception AttributeError: "'NoneType' object has no attribute 'path'" in <bound 
method sysfsGpio.__del__ of <__main__.sysfsGpio instance at 0xb6c90e68>> ignored
destroying /sys/class/gpio/gpio13/
Exception AttributeError: "'NoneType' object has no attribute 'path'" in <bound 
method sysfsGpio.__del__ of <__main__.sysfsGpio instance at 0xb6c90e40>> ignored

It is necessary to have two functions defined (railVarRes() and 
batleveltopct()) and further more changing the name of railVarRes to 
arailVarRes changes the behavior:


init called
finished init
init called
finished init
init called
finished init
initPorts done
alldone
destroying /sys/class/gpio/gpio16/
destroying /sys/class/gpio/gpio13/
destroying /sys/class/gpio/gpio6/
Exception AttributeError: "'NoneType' object has no attribute 'path'" in <bound 
method sysfsGpio.__del__ of <__main__.sysfsGpio instance at 0xb6c10e68>> ignored


notice that the order of the class destruction has changed.

----------
files: bug.py
messages: 254612
nosy: Terry Garyet
priority: normal
severity: normal
status: open
title: Exception AttributeError: "'NoneType'....  thrown on exit
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file41032/bug.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25619>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to