# so that it is immediately visible at myplc (gui or api).
#
+from __future__ import print_function
+
import xml, xmlrpclib
import logging
import time
parts = string.split(line, "=")
if len(parts) != 2:
- print "Invalid line in vars file: {}".format(line)
+ print("Invalid line in vars file: {}".format(line))
validConfFile = False
break
vars_file.close()
if not validConfFile:
- print "Unable to read configuration vars."
+ print("Unable to read configuration vars.")
return vars
f.write("{}\n".format(pid))
f.close()
except:
- print "Uuuhhh.... this should not occur."
+ print("Uuuhhh.... this should not occur.")
sys.exit(1)
def start_and_run():
api.AuthCheck()
break
except:
- print "Retry in 30 seconds: ", os.popen("uptime").read().strip()
+ print("Retry in 30 seconds: ", os.popen("uptime").read().strip())
traceback.print_exc()
time.sleep(30)
api.ReportRunlevel({'run_level' : 'failboot'})
except:
- print "reporting error: ", os.popen("uptime").read().strip()
+ print("reporting error: ", os.popen("uptime").read().strip())
traceback.print_exc()
sys.stdout.flush()