def check_access_and_print_warning(sock_dir):
 if (os.access(sock_dir, os.R_OK) and os.access(sock_dir, os.W_OK) and os.access(sock_dir, os.X_OK)):
  return
 else:
  print('WARNING: Events will not be reported (not able to access {0})'.format(sock_dir))

def check_access_and_print_warning ( sock_dir ) : if ( os . access ( sock_dir , os . R_OK ) and os . access ( sock_dir , os . W_OK ) and os . access ( sock_dir , os . X_OK ) ) : return else : print ( 'WARNING: Events will not be reported (not able to access {0})' . format ( sock_dir ) )
check if this user is able to access the socket directory and print a warning if not .