Revision 691c98cf snf-cyclades-app/synnefo/db/pools/__init__.py
b/snf-cyclades-app/synnefo/db/pools/__init__.py | ||
---|---|---|
57 | 57 |
|
58 | 58 |
def get(self, value=None): |
59 | 59 |
"""Get a value from the pool.""" |
60 |
if self.empty(): |
|
61 |
raise EmptyPool |
|
62 | 60 |
if value is None: |
61 |
if self.empty(): |
|
62 |
raise EmptyPool |
|
63 | 63 |
# Get the first available index |
64 | 64 |
index = int(self.pool.index(AVAILABLE)) |
65 | 65 |
assert(index < self.pool_size) |
Also available in: Unified diff