@@ -17,12 +17,19 @@
1717# along with this program. If not, see <http://www.gnu.org/licenses/>.
1818#
1919
20−from autopilot.introspection import (
21− get_proxy_object_for_existing_process,
22− ProcessSearchError,
23−)
2420import logging
2521import subprocess
22+import sys
23+
24+# This has to work in both python 3 (ap 1.5) and py2 (ap legacy 1.4.1) so we
25+# pick the correct location in each case. Remove the py2 branch once we no
26+# longer need to support python 2.
27+if sys.version >= '3':
28+ from autopilot.exceptions import ProcessSearchError
29+else:
30+ from autopilot.introspection import ProcessSearchError
31+from autopilot.introspection import get_proxy_object_for_existing_process
32+
2633from unity8.shell import emulators
2734from unity8.shell.emulators import main_window as main_window_emulator
2835