| Index: build/android/screenshot.py
|
| diff --git a/build/android/screenshot.py b/build/android/screenshot.py
|
| index fb1aee1d985aaedef0c47c22605328ff4ca969bd..8fe2a95ddd9948e783f7c0831abf4deb421fea91 100755
|
| --- a/build/android/screenshot.py
|
| +++ b/build/android/screenshot.py
|
| @@ -69,9 +69,13 @@ def main():
|
| if options.verbose:
|
| logging.getLogger().setLevel(logging.DEBUG)
|
|
|
| - if not options.device and len(android_commands.GetAttachedDevices()) > 1:
|
| + devices = android_commands.GetAttachedDevices()
|
| +
|
| + if not options.device and len(devices) > 1:
|
| parser.error('Multiple devices are attached. '
|
| 'Please specify device serial number with --device.')
|
| + elif not options.device and len(devices) == 1:
|
| + options.device = devices[0]
|
|
|
| if len(args) > 1:
|
| parser.error('Too many positional arguments.')
|
|
|