The attached patch file did the job, I recommend it be applied to the main branch!
Thanks! (Sorry for the delay; I lost my dev platform for a while; just got it back up) --Jim On Tue, Aug 3, 2010 at 10:19 PM, Joshua J. Kugler <jos...@azariah.com> wrote: > On Saturday 31 July 2010, Paul Alfille elucidated thus: >> If you find a solution, I'll add it to the next release. > > OK, I found the solution. What was happening was this: > > 1. Class had defined a custom __getattr__ > 2. Then in __getattr__, the class tried to access an attribute via > self._attribute_name > 3. This then, of course, called __getattr__ again. > > I'm not 100% sure why it's not finding _attrs in the instance variables. > You might want to run the fix against the test suite. > > Why this did not blow up before Python 2.6, I don't know. > > And here is the output before the fix (no sensors attached, just a USB > key): > > DEFAULT: ow_ds9490.c:DS9490_detect(457) Unclear what <> means in USB > specification, will use first adapter. > DEFAULT: ow_ds9490.c:DS9490_open(1238) Opened USB DS9490 bus master at > 003:002. > DEFAULT: ow_ds9490.c:DS9490_ID_this_master(600) Set DS9490 003:002 > unique id to 81 4B C9 2C 00 00 00 94 > DS9490 - / > Exception RuntimeError: 'maximum recursion depth exceeded in > __subclasscheck__' in <type 'exceptions.AttributeError'> ignored > Exception RuntimeError: 'maximum recursion depth exceeded in > __subclasscheck__' in <type 'exceptions.AttributeError'> ignored > Exception RuntimeError: 'maximum recursion depth exceeded in > __subclasscheck__' in <type 'exceptions.AttributeError'> ignored > Exception RuntimeError: 'maximum recursion depth exceeded in > __subclasscheck__' in <type 'exceptions.AttributeError'> ignored > Exception RuntimeError: 'maximum recursion depth exceeded in > __subclasscheck__' in <type 'exceptions.AttributeError'> ignored > Exception RuntimeError: 'maximum recursion depth exceeded in > __subclasscheck__' in <type 'exceptions.AttributeError'> ignored > DS1420 - /81.4BC92C000000 > > And after: > DEFAULT: ow_ds9490.c:DS9490_detect(457) Unclear what <> means in USB > specification, will use first adapter. > DEFAULT: ow_ds9490.c:DS9490_open(1238) Opened USB DS9490 bus master at > 003:002. > DEFAULT: ow_ds9490.c:DS9490_ID_this_master(600) Set DS9490 003:002 > unique id to 81 4B C9 2C 00 00 00 94 > DS9490 - / > DS1420 - /81.4BC92C000000 > > Hope that helps! Feedback welcome! > > j > > -- > Joshua J. Kugler - Fairbanks, Alaska > Azariah Enterprises - Programming and Website Design > jos...@azariah.com - Jabber: pedah...@gmail.com > PGP Key: http://pgp.mit.edu/ ID 0x73B13B6A > > --- __init__.py.orig 2010-08-03 20:55:50.000000000 -0800 > +++ __init__.py 2010-08-03 21:10:59.000000000 -0800 > @@ -343,14 +343,11 @@ > and thr PIO.0 might be 1. > """ > #print 'Sensor.__getattr__', name > - if name in self._attrs: > - attr = owfs_get( self._attrs[ name ] ) > - else: > + try: > + return owfs_get(object.__getattribute__(self, '_attrs')[name]) > + except KeyError: > raise AttributeError, name > > - return attr > - > - > def __setattr__( self, name, value ): > """ > Set the value of a sensor attribute. This is accomplished by > > ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers