Permalink
Browse files

Do duck typing for the list of choices.

  • Loading branch information...
1 parent f311acf commit 2537fe0069a2bab9936c79ac8cb6e89aa43fcbab @almet almet committed Aug 27, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 memcachepool/cache.py
View
@@ -52,7 +52,7 @@ def _pick_server(self):
choices = [server for server in self._servers
if server not in self._blacklist]
- if choices == []:
+ if not choices:
return None
return random.choice(choices)

0 comments on commit 2537fe0

Please sign in to comment.