def delete_pid_file_if_exists(program_name, pid_files_dir=None):
 pidfile_path = get_pid_path(program_name, pid_files_dir)
 try:
  os.remove(pidfile_path)
 except OSError:
  if (not os.path.exists(pidfile_path)):
   return
  raise

def delete_pid_file_if_exists ( program_name , pid_files_dir = None ) : pidfile_path = get_pid_path ( program_name , pid_files_dir ) try : os . remove ( pidfile_path ) except OSError : if ( not os . path . exists ( pidfile_path ) ) : return raise
tries to remove <program_name> .