Skip to content

Commit 79f43b2

Browse files
committed
Fix LoopingCallBase argument issue
I changed the argument order for LoopingCallBase based on a pep8 failure, but it led to the code not working. Changed caller to correctly specify the argument using the 'f' keyword to fix the issue. Closes-bug: #2112492 Change-Id: Iceac2354a669939435c1ed0d32294abc56462f98 Signed-off-by: Brian Haley <[email protected]>
1 parent d9269bc commit 79f43b2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

neutron/agent/metadata/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def _init_state_reporting(self):
296296
report_interval = cfg.CONF.AGENT.report_interval
297297
if report_interval:
298298
self.heartbeat = loopingcall.FixedIntervalLoopingCall(
299-
self._report_state)
299+
f=self._report_state)
300300
self.heartbeat.start(interval=report_interval)
301301

302302
def _report_state(self):

neutron/tests/unit/agent/metadata/test_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def test_run(self, ensure_dir, server, handler):
447447
server.assert_has_calls([
448448
mock.call('/the/path', mock.ANY),
449449
mock.call().serve_forever()])
450-
self.looping_mock.assert_called_once_with(p._report_state)
450+
self.looping_mock.assert_called_once_with(f=p._report_state)
451451
self.looping_mock.return_value.start.assert_called_once_with(
452452
interval=mock.ANY)
453453

0 commit comments

Comments
 (0)