title: Python : Zip extraction exception
body: <p>I made an automatic extractor for my music catalog.
  I wrote my code as sort to work with zips and rar files.
  The code is working fine but if there are other kind of files in the working directories, then I receive an error message :</p>
  
  <pre><code>raise BadZipfile, "File is not a zip file"
  BadZipfile: File is not a zip file
  </code></pre>
  
  <p>That means a mp3 file or anything else is blocking or interrupting the extraction process.
  Here's my code :</p>
  
  <pre><code>def extraction():
      funcs = {'.rar':rarfile.RarFile, '.zip':zipfile.ZipFile}
      for ArchivesFiles in chemin_zipfiles :    
          truncated_file, ext = os.path.splitext(os.path.basename(ArchivesFiles)) 
          if not os.path.exists(truncated_file):
              new_folder = os.makedirs(truncated_file)
              arch_ref = funcs[ext](ArchivesFiles,'r')
              new_folder = os.path.realpath(truncated_file)
              arch_ref.extractall(new_folder)
  </code></pre>
  
  <p>How could I avoid this?</p>
  
  <p>edit :</p>
  
  <p>I made some changes:</p>
  
  <pre><code>def extraction():
      funcs = {'.rar':rarfile.RarFile, '.zip':zipfile.ZipFile}
      for ArchivesFiles in chemin_zipfiles :    
          truncated_file, ext = os.path.splitext(os.path.basename(ArchivesFiles)) 
          if not os.path.exists(truncated_file):
              new_folder = os.makedirs(truncated_file)
              arch_ref = funcs[ext](ArchivesFiles,'r')
              new_folder = os.path.realpath(truncated_file)
              try:
                  arch_ref.extractall(new_folder)
              except BadZipfile:
                  continue
              except NotRarFile:
                  continue
  </code></pre>
  
  <p>but still receiving an error:</p>
  
  <pre><code>raise NotRarFile("Not a Rar archive: "+self.rarfile)
  NotRarFile: Not a Rar archive: /Volumes/me/albums/reggae/reggae_dub/._Dubalizer_SubExisteÌncia_freshpoulp.rar
  </code></pre>
  
  <p>Many thanks.</p>