Skip to content

Duplicated code in gitlab/config.py #1094

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

Closed
guiljin opened this issue May 8, 2020 · 1 comment · Fixed by #1099
Closed

Duplicated code in gitlab/config.py #1094

guiljin opened this issue May 8, 2020 · 1 comment · Fixed by #1099
Assignees

Comments

@guiljin
Copy link

guiljin commented May 8, 2020

Description of the problem, including code/CLI snippet

Duplicated code found in gitlab/config.py . I think one should be get from 'global'.

        self.http_username = None
        self.http_password = None
        try:
            self.http_username = self._config.get(self.gitlab_id, "http_username")
            self.http_password = self._config.get(self.gitlab_id, "http_password")
        except Exception:
            pass

        self.http_username = None
        self.http_password = None
        try:
            self.http_username = self._config.get(self.gitlab_id, "http_username")
            self.http_password = self._config.get(self.gitlab_id, "http_password")
        except Exception:
            pass

Expected Behavior

Actual Behavior

Specifications

  • python-gitlab version: python-gitlab==2.2.0
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com):
@max-wittig
Copy link
Member

I will take a look soon.

@max-wittig max-wittig self-assigned this May 12, 2020
max-wittig added a commit that referenced this issue May 16, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants