title: Unable to print "Unknown" if a AWS instance is not having a name tag associated using Python
body: <p>Below is a little code snippet of a program i wrote which gets all instance ip and instance tags associated with it. I can easily do this using boto , my problem is if i find a AWS instance which is not having any tag name associated with it i want to display/write in file "ip UNKNOWN".</p>
  
  <pre><code>for reservation in reservations: 
    for instances in reservation.instances: 
      if instances.state == "running": 
       print instances.private_ip_address,instances.tags['Name'] 
       fileCSV.write("%s %s\n"%(instances.private_ip_address,instances.tags['Name'])) 
      if instances.state == "running" and 'Name' in instances.tags==' ': 
       print "%s %s" % (instances.private_ip_address,"UNKNOWN") 
       fileCSV.write("%s %s\n"%(instances.private_ip_address,"UNKNOWN")
  </code></pre>
  
  <p>This code prints something like this </p>
  
  <pre><code>192.124.121.17
  192.124.121.11 squid-server
  192.124.121.13 apache
  </code></pre>
  
  <p>I am expecting :</p>
  
  <pre><code>192.124.121.17 UNKNOWN
  192.124.121.11 squid-server
  192.124.121.13 apache
  </code></pre>