@@ -17,12 +17,19 @@
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
20−from autopilot.introspection import (
21− get_proxy_object_for_existing_process,
24import logging
20import logging
25import subprocess
21import subprocess
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
30+ from autopilot.introspection import ProcessSearchError
31+from autopilot.introspection import get_proxy_object_for_existing_process
26from unity8.shell import emulators
33from unity8.shell import emulators
27from unity8.shell.emulators import main_window as main_window_emulator
34from unity8.shell.emulators import main_window as main_window_emulator