automated bugzilla submission

Robert Olson olson at mcs.anl.gov
Fri Jan 31 14:54:46 CST 2003


Following is a python script that can be used to automatically submit 
bugzilla bugs... this logic could get attached to a form for the user to 
fill out when a crash happens, and have the traceback sent off to our bugzilla.

--bob

import sys
import urllib

url = "http://bugzilla.mcs.anl.gov/accessgrid/post_bug.cgi"
args = {}

bugzilla_login = 'client-ui-bugzilla-user at mcs.anl.gov'
bugzilla_password = '8977f68349f93fead279e5d4cdf9c3a3'

args['Bugzilla_login'] = bugzilla_login
args['Bugzilla_password'] = bugzilla_password
args['product'] = "Virtual Venues Client Software"
args['version'] = "2.0"
args['component'] = "Client UI"
args['rep_platform'] = "Other"

#
# This detection can get beefed up a lot; I say
# NT because I can't tell if it's 2000 or XP and better
# to not assume there.
#
# cf http://www.lemburg.com/files/python/platform.py
#

if sys.platform.startswith("linux"):
     args['op_sys'] = "Linux"
elif sys.platform == "win32":
     args['op_sys'] = "Windows NT"
else:
     args['op_sys'] = "other"

args['priority'] = "P2"
args['bug_severity'] = "normal"
args['bug_status'] = "NEW"
args['assigned_to'] = ""
args['cc'] = "olson at mcs.anl.gov"   # email to be cc'd
args['bug_file_loc'] = "http://"


args['submit'] = "    Commit    "
args['form_name'] = "enter_bug"

# Bug information goes here
args['short_desc'] = "Crash in Client UI"
args['comment']="Here goes the backtrace"

#
# Now submit to the form.
#

params = urllib.urlencode(args)

f = urllib.urlopen(url, params)

#
# And read the output.
#

out = f.read()
f.close()

print "Submit returns ", out

o = open("out.html", "w")
o.write(out)
o.close()




More information about the ag-dev mailing list