Commit ad26d978 authored by Jim Fulton's avatar Jim Fulton

Fixed a bug in my ealier optimizations.

parent d2fb7a69
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
# #
############################################################################## ##############################################################################
__version__='$Revision: 1.15 $'[11:-2] __version__='$Revision: 1.16 $'[11:-2]
import regex, sys, os, string import regex, sys, os, string
from string import lower, atoi, rfind, split, strip, join, upper, find from string import lower, atoi, rfind, split, strip, join, upper, find
...@@ -337,7 +337,7 @@ class HTTPRequest(BaseRequest): ...@@ -337,7 +337,7 @@ class HTTPRequest(BaseRequest):
if not hasattr(x,attr): if not hasattr(x,attr):
#If the attribute does not #If the attribute does not
#exist, set it #exist, set it
if seqf: item=[item] if flags&SEQUENCE: item=[item]
reclist.remove(x) reclist.remove(x)
setattr(x,attr,item) setattr(x,attr,item)
reclist.append(x) reclist.append(x)
...@@ -390,18 +390,18 @@ class HTTPRequest(BaseRequest): ...@@ -390,18 +390,18 @@ class HTTPRequest(BaseRequest):
# Create a new record, set its attribute # Create a new record, set its attribute
# and put it in the dictionary as a list # and put it in the dictionary as a list
a = record() a = record()
if seqf: item=[item] if flags&SEQUENCE: item=[item]
setattr(a,attr,item) setattr(a,attr,item)
mapping_object[key]=[a] mapping_object[key]=[a]
elif flags&RECORD: elif flags&RECORD:
# Create a new record, set its attribute # Create a new record, set its attribute
# and put it in the dictionary # and put it in the dictionary
if seqf: item=[item] if flags&SEQUENCE: item=[item]
r = mapping_object[key]=record() r = mapping_object[key]=record()
setattr(r,attr,item) setattr(r,attr,item)
else: else:
# it is not a record or list of records # it is not a record or list of records
if seqf: item=[item] if flags&SEQUENCE: item=[item]
mapping_object[key]=item mapping_object[key]=item
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment