Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 315226 Details for
Bug 452399
need bugzilla xmlrpc dependency chain call
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
deptree.py - example code for generating a deplist from a given bug ID
deptree.py (text/plain), 1.79 KB, created by
Will Woods
on 2008-08-28 15:06:20 UTC
(
hide
)
Description:
deptree.py - example code for generating a deplist from a given bug ID
Filename:
MIME Type:
Creator:
Will Woods
Created:
2008-08-28 15:06:20 UTC
Size:
1.79 KB
patch
obsolete
>#!/usr/bin/python >import bugzilla > >class XMLBugHandler(object): > def __init__(self,id): > self.bug = bugzilla.Bug(id) > >def _getdeplist(self,id,maxdepth=0,hide_resolved=0): > url = self.url.replace('/xmlrpc.cgi','/showdependencytree.cgi') > url = '%s?ctype=xml&id=%s&maxdepth=%i&hide_resolved=%i' % \ > (url,str(id),maxdepth,hide_resolved) > > # This is pretty stupid - we throw out a bunch of data - but it's a good > # starting point. > class XMLDepListHandler(object): > def __init__(self): > self.deplist = [] > self.getid = False > self.data = '' > def start_element(self, name, attrs): > if name == 'bug_id': > self.getid = True > def char_data(self, data): > if self.getid: > self.data += data > def end_element(self, name): > if self.getid and name == 'bug_id': > id = int(self.data) > if id not in self.deplist: > self.deplist.append(id) > self.data = '' > self.getid = False > > # Set up the XML parser > parser = bugzilla.xmlrpclib.expat.ParserCreate() > handler = XMLDepListHandler() > parser.StartElementHandler = handler.start_element > parser.CharacterDataHandler = handler.char_data > parser.EndElementHandler = handler.end_element > > try: > f = self._opener.open(url) > parser.ParseFile(f) > except IOError, e: > bugzilla.log.error("Failed to open %s: %s" % (url,str(e))) > return handler.deplist > >def getdeplist(bz,id,maxdepth=0,hide_resolved=0): > return _getdeplist(bz,id,maxdepth,hide_resolved) > >if __name__ == '__main__': > bzurl = 'https://bugzilla.redhat.com/xmlrpc.cgi' > bz = bugzilla.Bugzilla(url=bzurl) > print getdeplist(bz,'F10Blocker')
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 452399
: 315226 |
315229