class Proc(object): """ One of the processes that runs the copy of app """ def __init__(self, app, run_args): self.marked_for_reload = 0 self.proc_lock = threading.Lock() self.hosts = [] self.print_tracebacks = False self.new_host_check_interval = -1 self.app = app self.stopping = 0 self.wsgis_active = 0 self.chan = Chan() self.syntax_error = None try: self.chan.run_file(run_args) except Exception, e: print "Can't run file '%s' (probably syntax errors), "\ "and possibly can't detect it's hosts" % self.app.fn self.syntax_error = e.args[0]#traceback.format_exc() self.app.on_proc_restarted(self) self.force_hosts_check()