Commit d67f893b authored by Kean Johnston's avatar Kean Johnston
Browse files

[433] Use a local variable rather than one larger in scope

As per review, don't use self._session for the check to see if there is
an existing message queue running. Rather, use a localally scoped
variable that will get cleaned up when the function exits.
parent 6ff2610c
......@@ -275,16 +275,14 @@ class MsgQ:
# connect to the existing socket to see if there is an existing
# msgq running. Only if that fails do we remove the file and
# attempt to create a new socket.
existing_msgq = True
existing_msgq = None
self._session =
existing_msgq =
existing_msgq = False
self._session = None
existing_msgq = None
if existing_msgq:
raise MsgQRunningError("b10-msgq already running")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment