Code review comment for lp://staging/~thomir-deactivatedaccount/python-ubuntu-platform-api/add-mir-pkg

Revision history for this message
Robert Ancell (robert-ancell) wrote :

This is likely to break in the future:

102 +def _get_correct_backend():
103 + if exists('/tmp/mir_socket'):
104 + import _mir

Each shell will use a different socket in the $XDG_RUNTIME_DIR. A safer check is to see if $MIR_SOCKET is defined (though the shell might currently not define that either).

I'd recommend at least a big comment on why this is a temporary solution or check for the environment variable and optionally the socket.

« Back to merge proposal