Skip to content

Commit

Permalink
Fix repr(semaphore) for Python 2.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajdavis committed Jan 31, 2015
1 parent f04cbf9 commit 61cdac0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions toro/locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,11 @@ def __init__(self, value=1, io_loop=None):

def __repr__(self):
res = super(Semaphore, self).__repr__()
extra = 'locked' if self.locked() else 'unlocked,value:{}'.format(
extra = 'locked' if self.locked() else 'unlocked,value:{0}'.format(
self._value)
if self._waiters:
extra = '{},waiters:{}'.format(extra, len(self._waiters))
return '<{} [{}]>'.format(res[1:-1], extra)
extra = '{0},waiters:{1}'.format(extra, len(self._waiters))
return '<{0} [{1}]>'.format(res[1:-1], extra)

@property
def counter(self):
Expand Down

0 comments on commit 61cdac0

Please sign in to comment.