summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2021-02-24 00:24:14 +0100
committerGitHub <noreply@github.com>2021-02-24 00:24:14 +0100
commita7ec67f69a3177a9d6610ca7af80bcf09035cbbd (patch)
tree112c4a8be74592f5f974ee6ac9ebfad367583c2f
parentd90be1e6ed5b27e02e00cffec25317bef413fec4 (diff)
parent48ec9e0f6a2d2da0a24ef8292c70dc441836a913 (diff)
downloadgitlab-a7ec67f69a3177a9d6610ca7af80bcf09035cbbd.tar.gz
Merge pull request #1322 from JohnVillalovos/jlvillal/missing_vars
fix: undefined name errors in v4 objects
-rw-r--r--gitlab/v4/objects/ldap.py2
-rw-r--r--gitlab/v4/objects/projects.py10
2 files changed, 8 insertions, 4 deletions
diff --git a/gitlab/v4/objects/ldap.py b/gitlab/v4/objects/ldap.py
index 5355aaf..e6ff42a 100644
--- a/gitlab/v4/objects/ldap.py
+++ b/gitlab/v4/objects/ldap.py
@@ -50,4 +50,4 @@ class LDAPGroupManager(RESTManager):
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)
diff --git a/gitlab/v4/objects/projects.py b/gitlab/v4/objects/projects.py
index 320e511..19c5a2a 100644
--- a/gitlab/v4/objects/projects.py
+++ b/gitlab/v4/objects/projects.py
@@ -31,7 +31,11 @@ from .notes import ProjectNoteManager
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
@@ -556,10 +560,10 @@ class Project(RefreshMixin, SaveMixin, ObjectDeleteMixin, RESTObject):
* ``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: