runtime/PLCObject.py
changeset 2442 b13f021c68a5
parent 2432 dbc065a2f7a5
child 2443 75a274023970
--- a/runtime/PLCObject.py	Tue Oct 09 13:50:29 2018 +0300
+++ b/runtime/PLCObject.py	Tue Oct 09 14:03:44 2018 +0300
@@ -566,7 +566,7 @@
             try:
                 if replace_PLC_shared_object:
                     os.remove(old_PLC_filename)
-                for filename in file(extra_files_log, "r").readlines() + [extra_files_log]:
+                for filename in open(extra_files_log, "rt").readlines() + [extra_files_log]:
                     try:
                         os.remove(os.path.join(self.workingdir, filename.strip()))
                     except Exception:
@@ -583,7 +583,7 @@
                 open(self._GetMD5FileName(), "w").write(md5sum)
 
                 # Then write the files
-                log = file(extra_files_log, "w")
+                log = open(extra_files_log, "w")
                 for fname, fdata in extrafiles:
                     fpath = os.path.join(self.workingdir, fname)
                     open(fpath, "wb").write(fdata)