Bug extra_files deletion in working directory fixed
authorlaurent
Wed, 29 Jul 2009 10:48:02 +0200
changeset 364 27ea6a6747fc
parent 363 e0c4d3549369
child 365 a7f58414dea0
Bug extra_files deletion in working directory fixed
runtime/PLCObject.py
--- a/runtime/PLCObject.py	Wed Jul 29 10:30:19 2009 +0200
+++ b/runtime/PLCObject.py	Wed Jul 29 10:48:02 2009 +0200
@@ -123,10 +123,6 @@
 
             self._resumeDebug = self.PLClibraryHandle.resumeDebug
             self._resumeDebug.restype = None
-
-            self._PythonIterator = self.PLClibraryHandle.PythonIterator
-            self._PythonIterator.restype = ctypes.c_char_p
-            self._PythonIterator.argtypes = [ctypes.c_char_p]
             
             return True
         except:
@@ -317,9 +313,9 @@
             try:
                 os.remove(os.path.join(self.workingdir,
                                        self.CurrentPLCFilename))
-                for filename in file(extra_files_log, "r").readlines() + extra_files_log:
+                for filename in file(extra_files_log, "r").readlines() + [extra_files_log]:
                     try:
-                        os.remove(os.path.join(self.workingdir, filename))
+                        os.remove(os.path.join(self.workingdir, filename.strip()))
                     except:
                         pass
             except: