@@ -294,12 +294,19 @@ class UnityTestCase(AutopilotTestCase):
294294 logger.info("Cleaning up launching unity")
295295 subprocess.call(["/sbin/initctl", "unset-env", "QT_LOAD_TESTABILITY"])
296296
297+ # Workaround for issue: lp:1239491
297298 if model() != "Desktop":
298299 try:
299300 logger.info("Stopping maliit-server before unity.")
300− subprocess.check_call(["/sbin/initctl", "stop", "maliit-server"])
301+ subprocess.check_call([
302+ "/sbin/initctl",
303+ "stop",
304+ "maliit-server"
305+ ])
301306 except subprocess.CalledProcessError:
302− logger.warning("Appears that maliit-server was already stopped!")
307+ logger.warning(
308+ "Appears that maliit-server was already stopped!"
309+ )
303310
304311 try:
305312 logger.info("Stopping unity")
@@ -307,11 +314,15 @@ class UnityTestCase(AutopilotTestCase):
307314 except subprocess.CalledProcessError:
308315 logger.warning("Appears unity was already stopped!")
309316
310−
317+ # Workaround for issue: lp:1238645 and lp:1239491
311318 if model() != "Desktop":
312319 try:
313320 logger.info("Starting maliit-server again.")
314− subprocess.check_call(["/sbin/initctl", "start", "maliit-server"])
321+ subprocess.check_call([
322+ "/sbin/initctl",
323+ "start",
324+ "maliit-server"
325+ ])
315326 except subprocess.CalledProcessError as e:
316327 e.args += ("Failed to restart maliit-server.", )
317328 raise