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

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to