TrivialFix: '_lport_index' is used prior to global declaration

Fix warning: dragonflow/tests/unit/test_app_base.py:216: SyntaxWarning: name
'_lport_index' is used prior to global declaration

Change-Id: Ifba4ccf6fcc2dcfb2e6b5fe505fc1a0be48f7ce6
This commit is contained in:
Omer Anson 2018-02-22 16:02:37 +02:00
parent 32d7cf1572
commit 8d3c73b587
1 changed files with 1 additions and 1 deletions

View File

@ -210,8 +210,8 @@ def make_fake_port(id=None,
device_id='fake_device_id',
dhcp_params=None):
if id is None:
id = 'lport_{0}'.format(_lport_index)
global _lport_index
id = 'lport_{0}'.format(_lport_index)
_lport_index += 1
fake_port = l2.LogicalPort(