-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't tie entire library to ability to log into Bugzilla #26
Comments
Hi @omaciel , Sorry for the long time it took me to reach that. If you are not logged into Bugzilla, nothing will work. Do you have another approach for not restricting logging into Bugzilla? |
I feel that you could warn the user that being logged into Bugzilla is a hard requirement for getting full advantage of the features you're exposing, but perhaps one could still use this tool and get some value out of it? Anyhow, when debugging or working with your code, being restricted to being logged in to even import a module is imho not a good solution. Whatever functionality depending on being logged in could have a decorator that checks this, perhaps? |
Hi @omaciel , For now, I will warn the users of this repo that this is a hard requirement |
Here's how I created a similar functionality (albeit much simpler): https://github.com/SatelliteQE/bugwrangler/blob/master/bugwrangler/__init__.py#L22 As you can see, I create a configuration object that can be used by any/all methods that require authentication, and values are read from the environment. You could have it check if the credentials you need are found in a file, and if not, assume |
I just read this thread again and I just want to make sure about the login statement. |
All methods that import the
config.py
module are forcefully tied to the ability to log in to Bugzilla, which in my opinion is not what you want to do. Instead, perhaps have a method that can be called to execute thelogin
method? Simple things such as importing thehelpers.py
module will fail if you haven't configured your credentials to login to Bugzilla.The text was updated successfully, but these errors were encountered: