def publish_data(self):
self.publish_device_stats()<EOL>publish = self.publish<EOL>for node in self.nodes:<EOL><INDENT>try:<EOL><INDENT>if node.has_update():<EOL><INDENT>for data in node.get_data():<EOL><INDENT>publish(*data)<EOL><DEDENT><DEDENT><DEDENT>except NotImplementedError:<EOL><INDENT>raise<EOL><DEDENT>except Exception as error:<EOL><INDENT>self.node_error(node, error)<EOL><DEDENT><DEDENT>
publish node data if node has updates