{"action":"created","issue":{"url":"https://api.github.com/repos/ktbyers/netmiko/issues/167","labels_url":"https://api.github.com/repos/ktbyers/netmiko/issues/167/labels{/name}","comments_url":"https://api.github.com/repos/ktbyers/netmiko/issues/167/comments","events_url":"https://api.github.com/repos/ktbyers/netmiko/issues/167/events","html_url":"https://github.com/ktbyers/netmiko/issues/167","id":128248829,"number":167,"title":"Function net_connect.send_command, rstrip error","user":{"login":"wmann","id":8089800,"avatar_url":"https://avatars.githubusercontent.com/u/8089800?v=3","gravatar_id":"","url":"https://api.github.com/users/wmann","html_url":"https://github.com/wmann","followers_url":"https://api.github.com/users/wmann/followers","following_url":"https://api.github.com/users/wmann/following{/other_user}","gists_url":"https://api.github.com/users/wmann/gists{/gist_id}","starred_url":"https://api.github.com/users/wmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmann/subscriptions","organizations_url":"https://api.github.com/users/wmann/orgs","repos_url":"https://api.github.com/users/wmann/repos","events_url":"https://api.github.com/users/wmann/events{/privacy}","received_events_url":"https://api.github.com/users/wmann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-22T21:21:35Z","updated_at":"2016-01-22T21:36:13Z","closed_at":null,"body":"As the HP Procurve switches could run show commands in config mode. There was no problem using net_connect.send_config_set command for show commands. This works fine.\r\n\r\nCode looks like this:\r\nSSHClass = netmiko.ssh_dispatcher(device_type=switch['device_type'])\r\nnet_connect = SSHClass(**switch)\r\nshow_commands = ['show run']\r\noutput = net_connect.send_config_set(show_commands, delay_factor=2)\r\n\r\nThis works fine. Now I want to use the send_command function. I replaced send_config_set with send_command so the code looks like this\r\n\r\nSSHClass = netmiko.ssh_dispatcher(device_type=switch['device_type'])\r\nnet_connect = SSHClass(**switch)\r\nshow_commands = ['show run']\r\noutput = net_connect.send_command(show_commands, delay_factor=2)\r\n\r\nWith this function I get the following error:\r\n\r\nTraceback (most recent call last):\r\n  File \"script.py\", line 33, in <module>\r\n    output = net_connect.send_command(show_commands, delay_factor=2)\r\n  File \"C:\\Python27\\lib\\site-packages\\netmiko\\base_connection.py\", line 355, in send_command\r\n    command_string = command_string.rstrip(\"\\n\")\r\nAttributeError: 'list' object has no attribute 'rstrip'\r\n\r\nAny idea how to fix this?\r\n\r\nBest Regards\r\nwmann"},"comment":{"url":"https://api.github.com/repos/ktbyers/netmiko/issues/comments/174057444","html_url":"https://github.com/ktbyers/netmiko/issues/167#issuecomment-174057444","issue_url":"https://api.github.com/repos/ktbyers/netmiko/issues/167","id":174057444,"user":{"login":"wmann","id":8089800,"avatar_url":"https://avatars.githubusercontent.com/u/8089800?v=3","gravatar_id":"","url":"https://api.github.com/users/wmann","html_url":"https://github.com/wmann","followers_url":"https://api.github.com/users/wmann/followers","following_url":"https://api.github.com/users/wmann/following{/other_user}","gists_url":"https://api.github.com/users/wmann/gists{/gist_id}","starred_url":"https://api.github.com/users/wmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmann/subscriptions","organizations_url":"https://api.github.com/users/wmann/orgs","repos_url":"https://api.github.com/users/wmann/repos","events_url":"https://api.github.com/users/wmann/events{/privacy}","received_events_url":"https://api.github.com/users/wmann/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T21:36:13Z","updated_at":"2016-01-22T21:36:13Z","body":"I should learn more python ;-("}}