on xenial help sign in
Fall back to /tmp if XDG_RUNTIME_DIR not set.
3dc2504Michał Sawicz
tests/autopilot/unity8/shell/tests/__init__.py+1−5
@@ -167,11 +167,7 @@ class UnityTestCase(AutopilotTestCase):
167 # FIXME: we shouldn't be doing this
167 # FIXME: we shouldn't be doing this
168 # $MIR_SOCKET, fallback to $XDG_RUNTIME_DIR/mir_socket and /tmp/mir_socket as last resort
168 # $MIR_SOCKET, fallback to $XDG_RUNTIME_DIR/mir_socket and /tmp/mir_socket as last resort
169 try:
169 try:
170− os.unlink(os.getenv('MIR_SOCKET', os.path.join(os.getenv('XDG_RUNTIME_DIR'), "mir_socket")))
170+ os.unlink(os.getenv('MIR_SOCKET', os.path.join(os.getenv('XDG_RUNTIME_DIR', '/tmp'), "mir_socket")))
171− except OSError:
172− pass
173− try:
174− os.unlink("/tmp/mir_socket")
175 except OSError:
171 except OSError:
176 pass
172 pass
177
173