title: Cannot Print output for Fortigate Command with Python
body: <p>I am having an issue with getting my python script to return or print any output for the following command run on my fortigate firewall</p>
  <p>'diagnose sniffer packet any &quot;host X.X.X.X and port 53&quot; 4 0 a</p>
  <pre><code>def dns_pcap():
      device = ConnectHandler(device_type=&quot;fortinet&quot;, ip=&quot;X.X.X.X&quot;, username=&quot;xxxxxxxx&quot;, password=&quot;xxxxxxxxx&quot;)
      lines = []
      gi_pcap = device.send_command('diagnose sniffer packet GI &quot;host X.X.X&gt;X and port 53&quot; 4 0 a')
      output = device.read_channel()
  
      print(output)
  
  dns_pcap()
  </code></pre>
  <p>The script outputs nothing to my terminal, anyone have any idea how to get the output of this to command to print to my screen?</p>
  <p>(Also please note I am using python2.7)</p>
  <p>I have many scripts running to both fortinet and cisco devices, and they all print outputs from variable assigned commands to screen when i execute my scripts, but not in this case</p>
  <p>I am assuming it is because the output is not static like a 'show system interface' but I am not sure how to handle dynamic output from a command.</p>