generated from jCloud/repository-template
Add checking whether sub namespaces are not empty in core.python.namespaces.PythonPackageNamespace.namespace
This commit is contained in:
@@ -57,6 +57,10 @@ class PythonPackageNamespace(PythonNamespace):
|
||||
if not sub_namespaces:
|
||||
raise InvalidNamespaceError('invalid namespace')
|
||||
|
||||
for sn in sub_namespaces:
|
||||
if not sn:
|
||||
raise InvalidNamespaceError('invalid namespace')
|
||||
|
||||
# check whether the sub namespace exists
|
||||
if sub_namespaces[0] not in self.sub_namespaces:
|
||||
raise NamespaceNotFoundError('no such namespace', namespace_identifier = sub_namespaces[0])
|
||||
|
||||
Reference in New Issue
Block a user