def safely_remove(path):
 try:
  os.remove(path)
 except OSError as err:
  if (err.errno != errno.ENOENT):
   raise

def safely_remove ( path ) : try : os . remove ( path ) except OSError as err : if ( err . errno != errno . ENOENT ) : raise
remove a file that may not exist .