title: image processing script
body: <p>I have a a code that i am running successfully but want to  convert a if statement so that it becomes slick. i want it to be able to go back to the beginning of the code so that it can start reading another image if it fails to open an image. the following is the code. all i have above is a connection to the database and fetching the first images</p>
  
  <pre><code>hDataset = gdal.Open( pszFilename, gdal.GA_ReadOnly ) 
  
      if hDataset is  None:
  
          print("gdalinfo failed - unable to open '%s'." % pszFilename )
  
           return 1
  </code></pre>