title: Python: Ping Test before doing anything
body: <p>I am currently trying to check if I got internet Connection before I do something but even though I Ping a Connection, and it should not jump into the If it still does.</p>
  <pre><code>ipaddress = '8.8.8.8'
  ipaddress2 = '8.8.4.4'
  response = os.system(&quot;ping -c 1 &quot; + ipaddress)
  response2 = os.system(&quot;ping -c 1 &quot; + ipaddress2)
  
  if response or response2 == 0:
      do something
  </code></pre>