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)
|