# HG changeset patch
# User lbessard
# Date 1220874950 -7200
# Node ID 01963beca02791d3be475c22b8579f9439370c21
# Parent  a770187273e9f89b52fa64826f5c1554a3f6a399
Bug with return value of nodelist saving fixed

diff -r a770187273e9 -r 01963beca027 plugger.py
--- a/plugger.py	Sun Sep 07 16:46:15 2008 +0200
+++ b/plugger.py	Mon Sep 08 13:55:50 2008 +0200
@@ -192,7 +192,7 @@
         # Call the plugin specific OnPlugSave method
         result = self.OnPlugSave()
         if not result:
-            return "Error while saving \"%s\""%self.PlugPath()
+            return "Error while saving \"%s\"\n"%self.PlugPath()
 
         # mark plugin as saved
         self.ChangesToSave = False        
@@ -272,7 +272,7 @@
     def IterChilds(self):
         for PlugType, PluggedChilds in self.PluggedChilds.items():
             for PlugInstance in PluggedChilds:
-                   yield PlugInstance
+                yield PlugInstance
     
     def IECSortedChilds(self):
         # reorder childs by IEC_channels
@@ -789,7 +789,9 @@
             self.SaveXMLFile(os.path.join(self.ProjectPath, 'plc.xml'))
         if self.PLCEditor:
             self.PLCEditor.RefreshTitle()
-        self.PlugRequestSave()
+        result = self.PlugRequestSave()
+        if result:
+            self.logger.write_error(result)
     
     # Update PLCOpenEditor Plugin Block types from loaded plugins
     def RefreshPluginsBlockLists(self):
diff -r a770187273e9 -r 01963beca027 plugins/canfestival/canfestival.py
--- a/plugins/canfestival/canfestival.py	Sun Sep 07 16:46:15 2008 +0200
+++ b/plugins/canfestival/canfestival.py	Mon Sep 08 13:55:50 2008 +0200
@@ -213,7 +213,7 @@
         
     def OnPlugSave(self):
         self.SetRoot(self.PlugPath())
-        return self.SaveProject() is not None
+        return self.SaveProject() is None
 
     def PlugGenerate_C(self, buildpath, locations):
         """