Skip to content

Commit

Permalink
fix: undefined name errors
Browse files Browse the repository at this point in the history
Discovered that there were some undefined names.
  • Loading branch information
JohnVillalovos committed Feb 23, 2021
1 parent d90be1e commit 48ec9e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gitlab/v4/objects/ldap.py
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
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

0 comments on commit 48ec9e0

Please sign in to comment.