@@ -272,11 +272,11 @@ def _run(self): # Low-level run method to do the actual scheduling loop. while self.running: try: self.sched.run() - except Exception,x: + except Exception as x: print >>sys.stderr, "ERROR DURING SCHEDULER EXECUTION",x print >>sys.stderr, "".join( traceback.format_exception(*sys.exc_info())) print >>sys.stderr, "-" * 20 # queue is empty; sleep a short while before checking again @@ -296,11 +296,11 @@ def __call__(self, schedulerref): """Execute the task action in the scheduler's thread.""" try: self.execute() - except Exception,x: + except Exception as x: self.handle_exception(x) self.reschedule(schedulerref()) def reschedule(self, scheduler): """This method should be defined in one of the sub classes!""" @@ -464,11 +464,11 @@ def threadedcall(self): # This method is run within its own thread, so we have to # do the execute() call and exception handling here. try: self.execute() - except Exception,x: + except Exception as x: self.handle_exception(x) class ThreadedIntervalTask(ThreadedTaskMixin, IntervalTask): """Interval Task that executes in its own thread.""" pass @@ -531,11 +531,11 @@ pid = os.fork() if pid == 0: # we are the child try: self.execute() - except Exception,x: + except Exception as x: self.handle_exception(x) os._exit(0) else: # we are the parent self.reschedule(schedulerref())