mirror of
https://github.com/openvswitch/ovs
synced 2025-10-27 15:18:06 +00:00
python: Fix invalid varable/function references.
This code referred to "rows" where it meant to refer to "fetched_rows". The patch resolves flake8 error: F821 undefined name 'rows' python/build/nroff.py used a function fatal() that was not defined, which raised the same type of error. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
@@ -343,7 +343,7 @@ endif
|
||||
if HAVE_FLAKE8
|
||||
ALL_LOCAL += flake8-check
|
||||
flake8-check: $(FLAKE8_PYFILES)
|
||||
$(AM_V_GEN) if flake8 $^ --ignore=E111,E112,E113,E123,E126,E127,E128,E129,E131,E201,E203,E222,E225,E226,E231,E241,E251,E261,E262,E265,E271,E302,E303,E501,E502,E703,E711,E713,E721,F811,F821,W601 ${FLAKE8_FLAGS}; then touch $@; else exit 1; fi
|
||||
$(AM_V_GEN) if flake8 $^ --ignore=E111,E112,E113,E123,E126,E127,E128,E129,E131,E201,E203,E222,E225,E226,E231,E241,E251,E261,E262,E265,E271,E302,E303,E501,E502,E703,E711,E713,E721,W601 ${FLAKE8_FLAGS}; then touch $@; else exit 1; fi
|
||||
endif
|
||||
|
||||
include $(srcdir)/manpages.mk
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
import re
|
||||
import sys
|
||||
|
||||
from ovs.db import error
|
||||
|
||||
@@ -108,6 +109,12 @@ def pre_to_nroff(nodes, para, font):
|
||||
s += '\n.fi\n'
|
||||
return s
|
||||
|
||||
|
||||
def fatal(msg):
|
||||
sys.stderr.write('%s\n' % msg)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def diagram_header_to_nroff(header_node):
|
||||
header_fields = []
|
||||
i = 0
|
||||
|
||||
@@ -1221,7 +1221,7 @@ class Transaction(object):
|
||||
if len(fetched_rows) != 1:
|
||||
# XXX rate-limit
|
||||
vlog.warn('"select" reply "rows" has %d elements '
|
||||
'instead of 1' % len(rows))
|
||||
'instead of 1' % len(fetched_rows))
|
||||
continue
|
||||
fetched_row = fetched_rows[0]
|
||||
if not Transaction.__check_json_type(fetched_row, (dict,),
|
||||
|
||||
Reference in New Issue
Block a user