Check for existence of logdog binary and logcat source before uploading.

BUG=654538

Review-Url: https://codereview.chromium.org/2507633002
Cr-Original-Commit-Position: refs/heads/master@{#432587}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4fe1c4e43e30d69d933a5849cdb10df5dae4ce50
This commit is contained in:
bpastene 2016-11-16 11:22:32 -08:00 коммит произвёл Commit bot
Родитель 5e75ea857e
Коммит 80fb707d32
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -72,7 +72,16 @@ def main():
'-service-account-json', args.service_account_json,
'stream', '-source', args.source,
'-stream', '-name=%s' % args.name]
if os.path.exists(args.logdog_bin_cmd):
if not os.path.exists(args.logdog_bin_cmd):
logging.error(
'Logfog binary %s unavailable. Unable to upload logcats.',
args.logdog_bin_cmd)
elif not os.path.exists(args.source):
logging.error(
'Logcat sources not found at %s. Unable to upload logcats.',
args.source)
else:
subprocess.call(logdog_cmd)
logging.info('Logcats are located at: %s', url)
return result