Remove deprecated LoopingCall
All users should switch over to FixedIntervalLoopingCall instead. Closes-Bug: #1307560 Change-Id: I8e29a84b68980090fcaeecaef8fe3960b851d3c9
This commit is contained in:
@@ -28,19 +28,19 @@ LOG = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
class LoopingCallDone(Exception):
|
class LoopingCallDone(Exception):
|
||||||
"""Exception to break out and stop a LoopingCall.
|
"""Exception to break out and stop a LoopingCallBase.
|
||||||
|
|
||||||
The poll-function passed to LoopingCall can raise this exception to
|
The poll-function passed to LoopingCallBase can raise this exception to
|
||||||
break out of the loop normally. This is somewhat analogous to
|
break out of the loop normally. This is somewhat analogous to
|
||||||
StopIteration.
|
StopIteration.
|
||||||
|
|
||||||
An optional return-value can be included as the argument to the exception;
|
An optional return-value can be included as the argument to the exception;
|
||||||
this return-value will be returned by LoopingCall.wait()
|
this return-value will be returned by LoopingCallBase.wait()
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, retvalue=True):
|
def __init__(self, retvalue=True):
|
||||||
""":param retvalue: Value that LoopingCall.wait() should return."""
|
""":param retvalue: Value that LoopingCallBase.wait() should return."""
|
||||||
self.retvalue = retvalue
|
self.retvalue = retvalue
|
||||||
|
|
||||||
|
|
||||||
@@ -98,11 +98,6 @@ class FixedIntervalLoopingCall(LoopingCallBase):
|
|||||||
return self.done
|
return self.done
|
||||||
|
|
||||||
|
|
||||||
# TODO(mikal): this class name is deprecated in Havana and should be removed
|
|
||||||
# in the I release
|
|
||||||
LoopingCall = FixedIntervalLoopingCall
|
|
||||||
|
|
||||||
|
|
||||||
class DynamicLoopingCall(LoopingCallBase):
|
class DynamicLoopingCall(LoopingCallBase):
|
||||||
"""A looping call which sleeps until the next known event.
|
"""A looping call which sleeps until the next known event.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user