runtime/PLCObject.py
changeset 1045 a220a27defe5
parent 1035 0f905e027d18
child 1051 847d68c3e7ff
--- a/runtime/PLCObject.py	Fri Apr 19 01:44:25 2013 +0200
+++ b/runtime/PLCObject.py	Fri Apr 19 11:19:55 2013 +0900
@@ -205,6 +205,10 @@
             PLCprint(self._loading_error)
             return False
 
+    def UnLoadPLC(self):
+        self.PythonRuntimeCleanup()
+        self._FreePLC()
+
     def _FreePLC(self):
         """
         Unload PLC library.
@@ -363,9 +367,8 @@
             NewFileName = md5sum + lib_ext
             extra_files_log = os.path.join(self.workingdir,"extra_files.txt")
 
-            self.PythonRuntimeCleanup()
-
-            self._FreePLC()
+            self.UnLoadPLC()
+
             self.LogMessage("NewPLC (%s)"%md5sum)
             self.PLCStatus = "Empty"