Skip to content

Commit ae2a388

Browse files
AmandaCameronguyzmo
authored andcommitted
_supports_nested_namespaces -> _max_nested_namespaces
1 parent 9ebc4fa commit ae2a388

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

git_repo/repo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ def set_repo_slug(self, repo_slug, auto=False):
212212
# in case a full URL is given as parameter, just extract the slug part.
213213
*namespace, self.repo_name = self.repo_slug.split('/')
214214
self.namespace = '/'.join(namespace)
215-
if len(namespace) > 1 and not self.service._supports_nested_namespaces:
215+
if len(namespace) > self.service._max_nested_namespaces:
216216
raise ArgumentError('Too many slashes.'
217-
'This service does not support nested namespaces.')
217+
'The maximum depth of namespaces is: {}'.format(self.service._max_nested_namespaces))
218218
else:
219219
self.namespace = None
220220
self.repo_name = self.repo_slug

git_repo/services/ext/gitlab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
class GitlabService(RepositoryService):
2222
fqdn = 'gitlab.com'
2323

24-
_supports_nested_namespaces = True
24+
_max_nested_namespaces = 21
2525

2626
def __init__(self, *args, **kwarg):
2727
self.session = gitlab.requests.Session()

git_repo/services/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class RepositoryService:
6969
'server-cert'
7070
]
7171

72-
_supports_nested_namespaces = False
72+
_max_nested_namespaces = 1
7373

7474
@staticmethod
7575
def get_config_path():

0 commit comments

Comments
 (0)