From e4cd6643b05756b862f57e423a2dbccdbaffcfe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 21 Mar 2016 15:50:03 +0100 Subject: [PATCH] Removed unused code. --- blender_cloud/pillar.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/blender_cloud/pillar.py b/blender_cloud/pillar.py index 7fc396e..b431138 100644 --- a/blender_cloud/pillar.py +++ b/blender_cloud/pillar.py @@ -311,22 +311,3 @@ def is_cancelled(future: asyncio.Future) -> bool: cancelled = future is not None and future.cancelled() log.debug('%s.cancelled() = %s', future, cancelled) return cancelled - - -async def parent_node_uuid(node_uuid: str) -> str: - """Returns the UUID of the node's parent node, or an empty string if this is the top level.""" - - api = pillar_api() - loop = asyncio.get_event_loop() - - log.debug('Finding parent node for node %r', node_uuid) - find_node = functools.partial(pillarsdk.Node.find, node_uuid, - {'projection': {'parent': 1}}, api=api) - node = await loop.run_in_executor(None, find_node) - if node is None: - log.debug('Unable to find node %r, returning empty parent', node_uuid) - return '' - - parent_uuid = node.parent or '' - log.debug('Parent node of %r is %r', node_uuid, parent_uuid) - return parent_uuid