Skip to content

Commit

Permalink
[lldpshow]: Fix input device is not a TTY error (sonic-net#1016)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ArunSaravananBalachandran authored Aug 3, 2020
1 parent 216688e commit dfaae69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/lldpshow
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Lldpshow(object):
lldp_interface_list = lldp_port if lldp_port is not None else self.lldp_interface[lldp_instace_num]
# In detail mode we will pass interface list (only front ports) and get O/P as plain text
# and in table format we will get xml output
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)
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)
p = subprocess.Popen(lldp_cmd, stdout=subprocess.PIPE, shell=True)
(output, err) = p.communicate()
## Wait for end of command. Get return returncode ##
Expand Down

0 comments on commit dfaae69

Please sign in to comment.