def safe_delete(filename):
 try:
  os.unlink(filename)
 except OSError as e:
  if (e.errno != errno.ENOENT):
   raise

def safe_delete ( filename ) : try : os . unlink ( filename ) except OSError as e : if ( e . errno != errno . ENOENT ) : raise
delete a file safely .