Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def add_node(self) -> Optional[CCNode]:
if self.readonly is True:
return None
while 1:
id = uuid.uuid4().hex
try:
self.updater.add_section(id)
except DuplicateSectionError:
continue
except:
return None
else:
break
return CCNode(self, self.updater[id])