aboutsummaryrefslogtreecommitdiffstats
path: root/tools/net/ynl/pyynl/ethtool.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/net/ynl/pyynl/ethtool.py')
-rwxr-xr-xtools/net/ynl/pyynl/ethtool.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/net/ynl/pyynl/ethtool.py b/tools/net/ynl/pyynl/ethtool.py
index cab6b576c876..87bb56108005 100755
--- a/tools/net/ynl/pyynl/ethtool.py
+++ b/tools/net/ynl/pyynl/ethtool.py
@@ -45,6 +45,9 @@ def print_field(reply, *desc):
Pretty-print a set of fields from the reply. desc specifies the
fields and the optional type (bool/yn).
"""
+ if not reply:
+ return
+
if len(desc) == 0:
return print_field(reply, *zip(reply.keys(), reply.keys()))