str(Iperf2) showing awaited_prompt
f.ex. moler.cmd.unix.iperf2.Iperf2("/usr/bin/iperf -s -u -p 50010 -B 192.168.44.130 -f k -P 2 -i 1", id:7fa8945f2278, awaited_prompt='vagrant@.*(\$|#|>)\s+')
@@ -86,6 +86,11 @@ class Iperf2(GenericUnixCommand, Publisher):
self._got_server_report = False
self._stopping_server = False
+ def __str__(self):
+ str_base_value = super(Iperf2, self).__str__()
+ str_value = "{}, awaited_prompt='{}')".format(str_base_value[:-1], self._re_prompt.pattern)
+ return str_value
+
_re_port = re.compile(r"(?P<PORT_OPTION>\-\-port|\-p)\s+(?P<PORT>\d+)")
def _validate_options(self, options):
