Bump...anyone ever hit this problem?

In production, it's not a big deal right now, but a working ow.finish() 
would be nice for unit testing.

j

On Monday 01 November 2010, Joshua J. Kugler elucidated thus:
> Given the following code:
>
> import sys
> import ow
>
>
> def tree( sensor ):
>     print '%7s - %s' % ( sensor._type, sensor._path )
>     for next in sensor.sensors( ):
>         if next._type in [ 'DS2409', ]:
>             tree( next )
>         else:
>             print '%7s - %s' % ( next._type, next._path )
>
>
> if __name__ == "__main__":
>     ow.init('--tester=28,28')
>     tree( ow.Sensor( '/' ) )
>     print 'New run'
>     ow.finish()
>     ow.init('--tester=28,28,28,28')
>     tree( ow.Sensor( '/' ) )
>
> I get this traceback:
>
> ow.exUnknownSensor: 'bus.0/interface/settings/name'
> File "/path/to/reinit-tree.py", line 22, in <module>
>   tree( ow.Sensor( '/' ) )
> File "/usr/lib/python2.6/dist-packages/ow/__init__.py", line 271, in
> __init__
>   self.useCache( self._useCache )
> File "/usr/lib/python2.6/dist-packages/ow/__init__.py", line 411, in
> useCache
>   self._type    = owfs_get('bus.0/interface/settings/name')
> File "/usr/lib/python2.6/dist-packages/ow/__init__.py", line 159, in
> _get
>   raise exUnknownSensor(path)
>
> Is the C API not fulling cleaning up when _OW.finish( ) is called? 
> Is there something I should be aware of?
>
> j



-- 
Joshua J. Kugler - Fairbanks, Alaska
Azariah Enterprises - Programming and Website Design
[email protected] - Jabber: [email protected]
PGP Key: http://pgp.mit.edu/  ID 0x73B13B6A

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to