Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.node.insert(NXgroup(nxclass=nxclass))
logging.info("'%s' added to '%s'"
% (self.node[name], self.node.nxpath))
elif name:
value = self.get_value()
dtype = self.get_type()
if value is not None:
if self.class_name == "NXfield":
self.node[name] = NXfield(value, dtype=dtype)
logging.info("'%s' added to '%s'"
% (name, self.node.nxpath))
units = self.get_units()
if units:
self.node[name].attrs['units'] = units
else:
self.node.attrs[name] = NXattr(value, dtype=dtype)
logging.info("Attribute '%s' added to '%s'"
% (name, self.node.nxpath))
super(AddDialog, self).accept()