From f57ef169125693881ae010e5f5225d1a1b0ba36c Mon Sep 17 00:00:00 2001 From: Greg Taylor Date: Fri, 25 May 2007 14:27:40 +0000 Subject: [PATCH] Function optimization. --- functions_comsys.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/functions_comsys.py b/functions_comsys.py index 905b53287..6282855a4 100644 --- a/functions_comsys.py +++ b/functions_comsys.py @@ -196,12 +196,7 @@ def get_cwho_list(channel_name, return_muted=False): return_muted: (bool) Return those who have the channel muted if True. """ sess_list = session_mgr.get_session_list() - result_list = [] - for sess in sess_list: - if plr_has_channel(sess, channel_name, return_muted): - result_list.append(sess) - - return result_list + return [sess for sess in sess_list if plr_has_channel(sess, channel_name, return_muted)] def send_cmessage(channel_name, message): """