Cosmetics for --forms

This commit is contained in:
Bernardo Damele 2010-11-14 21:59:35 +00:00
parent 0bfc1b411a
commit 5f46a549ba

View File

@ -133,12 +133,16 @@ def findPageForms():
count = 1
for form in forms:
request = form.click()
url = request.get_full_url()
method = request.get_method()
data = request.get_data() if request.has_data() else None
message = "(#%d) Do you want to test form '%s' (%s, %s%s) [Y/n] " % (count, form.name, method, url, ", %s" % repr(data) if data else "")
if form.name is None:
name = ""
else:
name = " '%s'" % form.name
message = "[#%d] Do you want to test form%s (%s, %s%s) [Y/n] " % (count, name, method, url, ", %s" % repr(data) if data else "")
test = readInput(message, default="Y")
if not test or test[0] in ("y", "Y"):