Index: sky/sdk/packages/sky/lib/sky_tool |
diff --git a/sky/sdk/packages/sky/lib/sky_tool b/sky/sdk/packages/sky/lib/sky_tool |
index 7d0747083bdc6d980f8a600397f30e78dd1074b9..f7b8b6f116411740fe3bfbafc86d241f13019619 100755 |
--- a/sky/sdk/packages/sky/lib/sky_tool |
+++ b/sky/sdk/packages/sky/lib/sky_tool |
@@ -209,8 +209,19 @@ class StopSky(object): |
class SkyShellRunner(object): |
+ def _check_for_adb(self): |
+ try: |
+ subprocess.call([ADB_PATH, '--help']) |
+ except OSError: |
+ print "'adb' (from the Android SDK) not in $PATH, can't continue." |
+ return False |
+ return True |
+ |
+ |
def main(self): |
logging.basicConfig(level=logging.WARNING) |
+ if not self._check_for_adb() |
+ sys.exit(2) |
parser = argparse.ArgumentParser(description='Sky Demo Runner') |
subparsers = parser.add_subparsers(help='sub-command help') |