This commit is contained in:
Michael Davidsaver
2019-09-03 20:52:13 -07:00
parent 62204d06d9
commit 849fa492f0
4 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,4 @@
from __future__ import print_function
import threading, sys, traceback, time import threading, sys, traceback, time

View File

@ -3,6 +3,8 @@
Some general purpose device supports Some general purpose device supports
""" """
from __future__ import print_function
import logging import logging
_log = logging.getLogger(__name__) _log = logging.getLogger(__name__)
@ -49,9 +51,9 @@ class AsyncOffload(object):
@initHook('AtIocExit') @initHook('AtIocExit')
def _exit(): def _exit():
print 'stop worker for', rec.NAME print('stop worker for', rec.NAME)
self.worker.join() self.worker.join()
self.worker.start() self.worker.start()
assert self.worker is not None, "Offload requires a worker thread" assert self.worker is not None, "Offload requires a worker thread"

View File

@ -27,7 +27,7 @@ def addHook(state, func):
which they were added (except for 'AtIocExit'). which they were added (except for 'AtIocExit').
>>> def show(): >>> def show():
... print 'State Occurred' ... print('State Occurred')
>>> addHook("AfterIocRunning", show) >>> addHook("AfterIocRunning", show)
An additional special hook 'AtIocExit' may be used An additional special hook 'AtIocExit' may be used

View File

@ -1,5 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import print_function
import logging import logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)