diff options
| author | Thomi Richards <thomi.richards@canonical.com> | 2012-01-24 14:48:51 +1300 |
|---|---|---|
| committer | Thomi Richards <thomi.richards@canonical.com> | 2012-01-24 14:48:51 +1300 |
| commit | 7dad2938143592132357e407521287356b07be4e (patch) | |
| tree | cead69d036e88ac575f4f20fa6bcfc93670fbba5 | |
| parent | d9cfa0dc4c9667a2a07cebb50e16d3ffb71ff12c (diff) | |
Now prints a more friendly message if it can't find the autopilot module.
(bzr r1845.4.10)
| -rwxr-xr-x | tools/unity-introspection-visualiser.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/unity-introspection-visualiser.py b/tools/unity-introspection-visualiser.py index 0d410b3a3..fae236e2c 100755 --- a/tools/unity-introspection-visualiser.py +++ b/tools/unity-introspection-visualiser.py @@ -4,13 +4,20 @@ # Script to generate a nice PNG file of the currently running unity introspection tree. from sys import argv import dbus -from autopilot.emulators.unity import Unity + +try: + from autopilot.emulators.unity import Unity +except ImportError: + print "Error: could not import the autopilot python module." + print "Make sure the autopilot module is in your $PYTHONPATH." + exit(1) try: import pydot except ImportError: print "Error: the 'pydot' module is required to run this script." print "Try installing the 'python-pydot' package." + exit(1) NEXT_NODE_ID=1 |
