diff options
author | Nejc Habjan <hab.nejc@gmail.com> | 2021-03-07 22:43:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-07 22:43:02 +0100 |
commit | de73ea7933d3f3c94aa27a7d9b9ea7bfd64ad1f1 (patch) | |
tree | 2d66f0ad7b2accd1b584aafd55c22aaf595d660e /gitlab/v4/cli.py | |
parent | 48fc907403b630f069dfd63fada73f96a8c6e983 (diff) | |
parent | 924f83eb4b5e160bd231efc38e2eea0231fa311f (diff) | |
download | gitlab-de73ea7933d3f3c94aa27a7d9b9ea7bfd64ad1f1.tar.gz |
Merge pull request #1365 from JohnVillalovos/jlvillal/getattr
chore: make _types always present in RESTManager
Diffstat (limited to 'gitlab/v4/cli.py')
-rw-r--r-- | gitlab/v4/cli.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gitlab/v4/cli.py b/gitlab/v4/cli.py index 6172f93..a768999 100644 --- a/gitlab/v4/cli.py +++ b/gitlab/v4/cli.py @@ -42,9 +42,8 @@ class GitlabCLI(object): self.mgr_cls._path = self.mgr_cls._path % self.args self.mgr = self.mgr_cls(gl) - types = getattr(self.mgr_cls, "_types", {}) - if types: - for attr_name, type_cls in types.items(): + if self.mgr_cls._types: + for attr_name, type_cls in self.mgr_cls._types.items(): if attr_name in self.args.keys(): obj = type_cls() obj.set_from_cli(self.args[attr_name]) |