Skip to content

Commit

Permalink
Fix small bug with request auto-detection
Browse files Browse the repository at this point in the history
  • Loading branch information
orf committed Jul 27, 2014
1 parent fb8fbca commit c01f1aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions example_application/src/example_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ def getChildren(node):

def node_to_object(node):
returner = {}
print node.getStringValue()
for child in getChildren(node):
if child is None:
continue
Expand All @@ -133,7 +132,6 @@ def execute(query):
}
returned_result.update(node_to_object(result))
returner.append(returned_result)
print "%s results" % len(returner)
return returner


Expand Down
4 changes: 3 additions & 1 deletion xcat/lib/requests/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ def change_parameter(self, target_parameter):
:param target_parameter: A parameter name that the returned detector targets
:return: A Detector that targets the given URI parameter
"""
return Detector(self.checker, copy.deepcopy(self.requests))
d = Detector(self.checker, copy.deepcopy(self.requests))
d.requests.set_target_parameter(target_parameter)
return d

def get_requester(self, injector, features=None):
requester = self.requests.with_injector(injector)
Expand Down
2 changes: 1 addition & 1 deletion xcat/xcat.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def xcat(ctx, target, arguments, target_parameter, match_string, method, detecti
OOBDocFeature.server = OOBHttpServer(host=public_ip, port=public_port)

ctx.obj["target_param"] = target_parameter
request_maker = RequestMaker(target, method, arguments, target_parameter, checker=checker)
request_maker = RequestMaker(target, method, arguments, target_parameter if target_parameter != "*" else None, checker=checker)
ctx.obj["detector"] = detector.Detector(checker, request_maker)


Expand Down

0 comments on commit c01f1aa

Please sign in to comment.