mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
make sure the get_namespace won't error out if it doesn't get anything
This commit is contained in:
parent
e0097ad517
commit
8b16bacb53
1 changed files with 5 additions and 1 deletions
|
|
@ -185,7 +185,11 @@ def maintained_selection():
|
|||
|
||||
def get_namespace(node):
|
||||
"""Return namespace of given node"""
|
||||
return node.rsplit("|", 1)[-1].rsplit(":", 1)[0]
|
||||
node_name = node.rsplit("|", 1)[-1]
|
||||
if ":" in node_name:
|
||||
return node_name.rsplit(":", 1)[0]
|
||||
else:
|
||||
return ""
|
||||
|
||||
|
||||
def strip_namespace(node, namespace):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue