Skip to content

Commit dfaae69

Browse files
[lldpshow]: Fix input device is not a TTY error (sonic-net#1016)
Fix Azure/sonic-buildimage#5019 Fix "the input device is not a TTY" error reported by 'show lldp' commands when executed via pytest scripts in sonic-mgmt.
1 parent 216688e commit dfaae69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/lldpshow

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class Lldpshow(object):
7474
lldp_interface_list = lldp_port if lldp_port is not None else self.lldp_interface[lldp_instace_num]
7575
# In detail mode we will pass interface list (only front ports) and get O/P as plain text
7676
# and in table format we will get xml output
77-
lldp_cmd = 'sudo docker exec -it lldp{} lldpctl '.format(self.lldp_instance[lldp_instace_num]) + ('-f xml' if not lldp_detail_info else lldp_interface_list)
77+
lldp_cmd = 'sudo docker exec -i lldp{} lldpctl '.format(self.lldp_instance[lldp_instace_num]) + ('-f xml' if not lldp_detail_info else lldp_interface_list)
7878
p = subprocess.Popen(lldp_cmd, stdout=subprocess.PIPE, shell=True)
7979
(output, err) = p.communicate()
8080
## Wait for end of command. Get return returncode ##

0 commit comments

Comments
 (0)