on xenial help sign in
Remove /tmp/mir_socket even if XDG_RUNTIME_DIR is set.
commit9af4407de5579ca948d7a747d28ba2d42400b843 authorMichał Sawicz <michal.sawicz@canonical.com> dateWed 9 Oct 2013, 22:57 (13 years ago) parent3dc2504
1 file changed+5−1
tests/autopilot/unity8/shell/tests/__init__.py+5−1
tests/autopilot/unity8/shell/tests/__init__.py+5−1
@@ -167,7 +167,11 @@ class UnityTestCase(AutopilotTestCase):
167167 # FIXME: we shouldn't be doing this
168168 # $MIR_SOCKET, fallback to $XDG_RUNTIME_DIR/mir_socket and /tmp/mir_socket as last resort
169169 try:
170− os.unlink(os.getenv('MIR_SOCKET', os.path.join(os.getenv('XDG_RUNTIME_DIR', '/tmp'), "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")
171175 except OSError:
172176 pass
173177