summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulia Kreger <juliaashleykreger@gmail.com>2018-11-29 13:05:51 -0800
committerJulia Kreger <juliaashleykreger@gmail.com>2018-12-05 13:56:37 +0000
commit59cf11bee6647f7c24a8ee7ca7750e8cedec19c2 (patch)
tree6fc3d686b1b22105652161fd7aa08f1c0b02d1c0
parent4f7ecb1e9262a65f1b12731b7720a527812011fd (diff)
Fix encoding for python3 lock naming1.3.0
Notes
Notes (review): Code-Review+2: Jim Rollenhagen <jim@jimrollenhagen.com> Code-Review+2: Mark Goddard <mark@stackhpc.com> Workflow+1: Julia Kreger <juliaashleykreger@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 05 Dec 2018 18:15:26 +0000 Reviewed-on: https://review.openstack.org/621007 Project: openstack/networking-generic-switch Branch: refs/heads/master
-rw-r--r--networking_generic_switch/locking.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/networking_generic_switch/locking.py b/networking_generic_switch/locking.py
index 2a0e65d..ebee9bf 100644
--- a/networking_generic_switch/locking.py
+++ b/networking_generic_switch/locking.py
@@ -57,7 +57,7 @@ class PoolLock(object):
57 # NOTE(pas-ha) currently all tooz backends support locking API. 57 # NOTE(pas-ha) currently all tooz backends support locking API.
58 # In case this changes, this should be wrapped to not respin 58 # In case this changes, this should be wrapped to not respin
59 # lock grabbing on NotImplemented exception. 59 # lock grabbing on NotImplemented exception.
60 lock = self.coordinator.get_lock(name) 60 lock = self.coordinator.get_lock(name.encode())
61 locked = lock.acquire(blocking=False) 61 locked = lock.acquire(blocking=False)
62 if not locked: 62 if not locked:
63 raise coordination.LockAcquireFailed( 63 raise coordination.LockAcquireFailed(