We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a675d1f commit 88c708fCopy full SHA for 88c708f
labgridhelper/linux.py
@@ -152,6 +152,8 @@ def get_interface_ip(command, interface="eth0"):
152
Returns:
153
str: IPv4 address of the interface, None otherwise
154
"""
155
+ assert isinstance(command, CommandProtocol), "command must be a CommandProtocol"
156
+
157
try:
158
ip_string = command.run_check("ip -o -4 addr show")
159
except ExecutionError:
@@ -186,6 +188,8 @@ def get_hostname(command):
186
188
187
189
str: hostname of the target, None otherwise
190
191
192
193
194
hostname_string = command.run_check("hostname")
195
0 commit comments