more py3
This commit is contained in:
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
import threading, sys, traceback, time
|
import threading, sys, traceback, time
|
||||||
|
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
|
@ -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__)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user