Hi,
One of the annoyances I have had using python-bugzilla in projects has been the need to copy-paste the login logic w/ token/cookie awareness.
To address this, I'd like to refactor the login logic from the cli code into bugzilla.util, for which changes might look something like [1]. This might not be the final version, I am open to suggestions.
Is this something that would be considered useful for other users?
-arun
[1] https://github.com/abn/python-bugzilla/commit/67ec0c76f4e9ad18b5b596be187242...
On 09/27/2014 02:47 AM, Arun Babu Neelicattu (Red Hat) wrote:
Hi,
One of the annoyances I have had using python-bugzilla in projects has been the need to copy-paste the login logic w/ token/cookie awareness.
To address this, I'd like to refactor the login logic from the cli code into bugzilla.util, for which changes might look something like [1]. This might not be the final version, I am open to suggestions.
Is this something that would be considered useful for other users?
-arun
Sounds good to me, but I'd prefer:
- Just add it to the BugzillaBase class. Saves creating the extra file, the getLogger hack, and it takes a Bugzilla instance anyways. Maybe name it interactive_login or something.
- Expand the docstring a bit to describe what it does and what the parameters are.
Thanks, Cole
Thanks Cole! Incorporated your suggestions and sent a patch. Let me know if any other changes are required.
-arun
----- Original Message -----
From: "Cole Robinson" crobinso@redhat.com To: "Arun Babu Neelicattu (Red Hat)" abn@redhat.com, python-bugzilla@lists.fedorahosted.org Sent: Saturday, September 27, 2014 10:36:39 PM Subject: Re: [python-bugzilla] Refactoring login logic
On 09/27/2014 02:47 AM, Arun Babu Neelicattu (Red Hat) wrote:
Hi,
One of the annoyances I have had using python-bugzilla in projects has been the need to copy-paste the login logic w/ token/cookie awareness.
To address this, I'd like to refactor the login logic from the cli code into bugzilla.util, for which changes might look something like [1]. This might not be the final version, I am open to suggestions.
Is this something that would be considered useful for other users?
-arun
Sounds good to me, but I'd prefer:
- Just add it to the BugzillaBase class. Saves creating the extra file, the
getLogger hack, and it takes a Bugzilla instance anyways. Maybe name it interactive_login or something.
- Expand the docstring a bit to describe what it does and what the parameters
are.
Thanks, Cole
python-bugzilla@lists.stg.fedorahosted.org