Skip to content

fix: undefined name errors #1322

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

Merged
merged 1 commit into from
Feb 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gitlab/v4/objects/ldap.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ def list(self, **kwargs):
if isinstance(obj, list):
return [self._obj_cls(self, item) for item in obj]
else:
return base.RESTObjectList(self, self._obj_cls, obj)
return RESTObjectList(self, self._obj_cls, obj)
10 changes: 7 additions & 3 deletions gitlab/v4/objects/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@
from .notification_settings import ProjectNotificationSettingsManager
from .packages import ProjectPackageManager
from .pages import ProjectPagesDomainManager
from .pipelines import ProjectPipelineManager, ProjectPipelineScheduleManager
from .pipelines import (
ProjectPipeline,
ProjectPipelineManager,
ProjectPipelineScheduleManager,
)
from .push_rules import ProjectPushRulesManager
from .releases import ProjectReleaseManager
from .runners import ProjectRunnerManager
Expand Down Expand Up @@ -556,10 +560,10 @@ def upload(self, filename, filedata=None, filepath=None, **kwargs):
* ``markdown`` - Markdown for the uploaded file
"""
if filepath is None and filedata is None:
raise GitlabUploadError("No file contents or path specified")
raise exc.GitlabUploadError("No file contents or path specified")

if filedata is not None and filepath is not None:
raise GitlabUploadError("File contents and file path specified")
raise exc.GitlabUploadError("File contents and file path specified")

if filepath is not None:
with open(filepath, "rb") as f:
Expand Down