[SQL-CVS] SQLObject/SQLObject SQLObject.py,1.24,1.25
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <ian...@us...> - 2003-04-19 03:31:14
|
Update of /cvsroot/sqlobject/SQLObject/SQLObject In directory sc8-pr-cvs1:/tmp/cvs-serv26941/SQLObject Modified Files: SQLObject.py Log Message: Raise TypeError if you give an unexpected keyword argument to new() Index: SQLObject.py =================================================================== RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/SQLObject.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** SQLObject.py 19 Apr 2003 01:04:18 -0000 1.24 --- SQLObject.py 19 Apr 2003 03:31:11 -0000 1.25 *************** *** 711,714 **** --- 711,716 ---- # The rest go through setattr(): for name, value in others.items(): + if not hasattr(inst, name): + raise TypeError, "%s.new() got an unexpected keyword argument %s" % (cls.__name__, name) setattr(inst, name, value) |