aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/server/process.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bb/server/process.py')
-rw-r--r--lib/bb/server/process.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 828159ed7..2246d954c 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -452,15 +452,14 @@ def connectProcessServer(sockname, featureset):
cwd = os.getcwd()
try:
- os.chdir(os.path.dirname(sockname))
- sock.connect(os.path.basename(sockname))
- finally:
- os.chdir(cwd)
-
- readfd = writefd = readfd1 = writefd1 = readfd2 = writefd2 = None
- eq = command_chan_recv = command_chan = None
+ try:
+ os.chdir(os.path.dirname(sockname))
+ sock.connect(os.path.basename(sockname))
+ finally:
+ os.chdir(cwd)
- try:
+ readfd = writefd = readfd1 = writefd1 = readfd2 = writefd2 = None
+ eq = command_chan_recv = command_chan = None
# Send an fd for the remote to write events to
readfd, writefd = os.pipe()