diff options
author | Will Woods <wwoods@redhat.com> | 2008-06-06 09:38:52 -0400 |
---|---|---|
committer | Will Woods <wwoods@redhat.com> | 2008-06-06 09:38:52 -0400 |
commit | dbd928a4b7ec66e10cf4b3c0e310ca211d76bbc2 (patch) | |
tree | a7c5c84872a7eba8346f066838d4b9dc743b85a8 /bugzilla/bugzilla3.py | |
parent | 8dcf06ea263105485096b6a3e2ab9da09ec4b3d5 (diff) | |
download | python-bugzilla-dbd928a4b7ec66e10cf4b3c0e310ca211d76bbc2.tar.gz python-bugzilla-dbd928a4b7ec66e10cf4b3c0e310ca211d76bbc2.tar.xz python-bugzilla-dbd928a4b7ec66e10cf4b3c0e310ca211d76bbc2.zip |
Fix cookie handling for bugzilla installations not on root of host, add some logging, abstractify login method
Diffstat (limited to 'bugzilla/bugzilla3.py')
-rw-r--r-- | bugzilla/bugzilla3.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/bugzilla/bugzilla3.py b/bugzilla/bugzilla3.py index 5e38c97..6849358 100644 --- a/bugzilla/bugzilla3.py +++ b/bugzilla/bugzilla3.py @@ -21,6 +21,10 @@ class Bugzilla3(bugzilla.base.BugzillaBase): bugzilla.base.BugzillaBase.__init__(self,**kwargs) self.user_agent = user_agent + def _login(self,user,password): + '''Backend login method for Bugzilla3''' + return self._proxy.User.login({'login':user,'password':password}) + #---- Methods and properties with basic bugzilla info def _getuserforid(self,userid): @@ -83,7 +87,8 @@ class Bugzilla3(bugzilla.base.BugzillaBase): in 'displaycolumns', and the SQL query used by this query will be in 'sql'. ''' - return self._proxy.bugzilla.runQuery(query,self.user,self.password) + #return self._proxy.bugzilla.runQuery(query,self.user,self.password) + raise NotImplementedError, "Bugzilla 3.0 does not support this method." #---- Methods for modifying existing bugs. @@ -203,8 +208,12 @@ class Bugzilla3(bugzilla.base.BugzillaBase): #---- createbug - call to create a new bug + createbug_required = ('product','component','summary','version', + 'op_sys','platform') + def _createbug(self,**data): '''Raw xmlrpc call for createBug() Doesn't bother guessing defaults or checking argument validity. Use with care. - Returns [bug_id, mailresults]''' - return self._proxy.bugzilla.createBug(data,self.user,self.password) + Returns bug_id''' + r = self._proxy.Bug.create(data) + return r['id'] |