Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#147 0.7.0 __getattr__ should raise AttributeError

closed-fixed
Oleg Broytman
General (126)
5
2006-02-06
2006-01-20
jt
No

If 'foo' is not an attribute of obj, obj.q.foo should
catch KeyError and raise an AttributeError.

sqlbuilder.py +362
--------------------------------------------------
return self.FieldClass(self.tableName,
self.soClass.sqlmeta.columns[attr].dbName,
attr)
--------------------------------------------------

I suppose some others __getattr__ have the same problem.

Discussion

  • jt
    jt
    2006-01-20

    Logged In: YES
    user_id=1002407

    and should have default value:
    getattr(object, 'method', default)

     
  • Oleg Broytman
    Oleg Broytman
    2006-02-06

    • status: open --> closed
     
  • Oleg Broytman
    Oleg Broytman
    2006-02-06

    Logged In: YES
    user_id=4799

    Fixed at the revision 1570 in the trunk; backported to the
    0.7 branch at the rev. 1571. Thank you!

     
  • Oleg Broytman
    Oleg Broytman
    2006-02-06

    • assigned_to: nobody --> phd
    • status: closed --> closed-fixed