Apache Mod-Python - Closed: (MODPYTHON-25) apply_fs_data() does not work with

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > March 2006 > Closed: (MODPYTHON-25) apply_fs_data() does not work with





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Closed: (MODPYTHON-25) apply_fs_data() does not work with
Graham Dumpleton (JIRA)

2006-03-05, 2:45 am

[ http://issues.apache.org/jira/brows...HON-25?page=all ]

Graham Dumpleton closed MODPYTHON-25:
-------------------------------------


> apply_fs_data() does not work with "new style" objects
> ------------------------------------------------------
>
> Key: MODPYTHON-25
> URL: http://issues.apache.org/jira/browse/MODPYTHON-25
> Project: mod_python
> Type: Bug
> Versions: 3.1.3
> Environment: gentoo-linux, apache 2, Python 2.3.4
> Reporter: Bruno Desthuilliers
> Assignee: Nicolas Lehuen
> Priority: Minor
> Fix For: 3.2.7


>
> util.py v.1.21, apply_fs_data()
> Trying to publish instances of a new style class, you get an exception
> (UnboundLocalError: local variable 'fc' referenced before assignment)
> pointing to util.py, line 356
> What happens is that the test line 336 doesn't work for new style classes, letting the code fallback to line 356 without fc being defined.
> The fix is pretty trivial: rewrite line 336 as:
> if type(obj) is InstanceType or isinstance(obj, object):
> Which leads to a second fix: the first arg of the function is named 'object', which seems sensible, but is also the name of the new style classes base class, so s/object/obj/ in that code is also needed.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com