diff options
author | Will Woods <wwoods@redhat.com> | 2008-08-05 15:51:31 -0400 |
---|---|---|
committer | Will Woods <wwoods@redhat.com> | 2008-08-05 15:51:31 -0400 |
commit | 2de4aecfcdf639aed2d895d84a629651c45c1351 (patch) | |
tree | c7333a1a57b5fe5c8dee4b9736caa87b483e1531 /bugzilla/bugzilla3.py | |
parent | 4ece95e2108afb80c8fa7e35ba6157358b0f6664 (diff) | |
download | python-bugzilla-2de4aecfcdf639aed2d895d84a629651c45c1351.tar.gz python-bugzilla-2de4aecfcdf639aed2d895d84a629651c45c1351.tar.xz python-bugzilla-2de4aecfcdf639aed2d895d84a629651c45c1351.zip |
Add _logout method, initial Bugzilla32 class
Diffstat (limited to 'bugzilla/bugzilla3.py')
-rw-r--r-- | bugzilla/bugzilla3.py | 25 |
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) |