Permalink
Browse files

list comprehension

  • Loading branch information...
1 parent 8e464c0 commit 93f9fa98a4fdafea84a7ccd314e6c892ef4a313f @spladug spladug committed Jun 18, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 utilization.py
View
@@ -28,10 +28,8 @@ def fetch_session_counts(haproxy_stats_urls):
current[proxy_name] += int(s_cur)
limit[proxy_name] += int(s_lim)
- ret = []
- for pool, limit in limit.most_common():
- ret.append((pool, current[pool], limit))
- return ret
+ return [(pool, current[pool], capacity)
+ for pool, capacity in limit.most_common()]
def notify_graphite(usage):

0 comments on commit 93f9fa9

Please sign in to comment.