title: How to raise exception if None value encountered in dict?
body: <p>I want to raise a <code>KeyError</code> exception if the value returned is <code>None</code>, but the following throws a <code>SyntaxError: invalid syntax</code> exception.</p>
  
  <pre><code>try:
     protocol = serverInfo_D['protocol'] or raise KeyError("protocol not present")
  except KeyError:
     print "Improper server config"
  </code></pre>
  
  <p>What's a simple way to get this working?</p>