summaryrefslogtreecommitdiffstats
path: root/bugzilla
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2008-08-05 15:51:31 -0400
committerWill Woods <wwoods@redhat.com>2008-08-05 15:51:31 -0400
commit2de4aecfcdf639aed2d895d84a629651c45c1351 (patch)
treec7333a1a57b5fe5c8dee4b9736caa87b483e1531 /bugzilla
parent4ece95e2108afb80c8fa7e35ba6157358b0f6664 (diff)
downloadpython-bugzilla-2de4aecfcdf639aed2d895d84a629651c45c1351.zip
python-bugzilla-2de4aecfcdf639aed2d895d84a629651c45c1351.tar.gz
python-bugzilla-2de4aecfcdf639aed2d895d84a629651c45c1351.tar.xz
Add _logout method, initial Bugzilla32 class
Diffstat (limited to 'bugzilla')
-rw-r--r--bugzilla/bugzilla3.py25
1 files changed, 20 insertions, 5 deletions
diff --git a/bugzilla/bugzilla3.py b/bugzilla/bugzilla3.py
index d5b1e9b..c9bde08 100644
--- a/bugzilla/bugzilla3.py
+++ b/bugzilla/bugzilla3.py
@@ -11,20 +11,25 @@
import bugzilla.base
-version = '0.1'
-user_agent = bugzilla.base.user_agent + ' Bugzilla3/%s' % version
-
class Bugzilla3(bugzilla.base.BugzillaBase):
'''Concrete implementation of the Bugzilla protocol. This one uses the
- methods provided by standard Bugzilla 3.x releases.'''
+ methods provided by standard Bugzilla 3.0.x releases.'''
+
+ version = '0.1'
+ user_agent = bugzilla.base.user_agent + ' Bugzilla3/%s' % version
+
def __init__(self,**kwargs):
bugzilla.base.BugzillaBase.__init__(self,**kwargs)
- self.user_agent = user_agent
+ self.user_agent = self.__class__.user_agent
def _login(self,user,password):
'''Backend login method for Bugzilla3'''
return self._proxy.User.login({'login':user,'password':password})
+ def _logout(self):
+ '''Backend login method for Bugzilla3'''
+ return self._proxy.User.logout()
+
#---- Methods and properties with basic bugzilla info
def _getuserforid(self,userid):
@@ -207,3 +212,13 @@ class Bugzilla3(bugzilla.base.BugzillaBase):
Returns bug_id'''
r = self._proxy.Bug.create(data)
return r['id']
+
+# Bugzilla 3.2 adds a whole bunch of new goodies.
+class Bugzilla32(Bugzilla3):
+ '''Concrete implementation of the Bugzilla protocol. This one uses the
+ methods provided by standard Bugzilla 3.2.x releases.'''
+
+ version = '0.1'
+ user_agent = bugzilla.base.user_agent + ' Bugzilla32/%s' % version
+
+ # TODO: add goodies (_query, etc)