Skip to content

Commit

Permalink
[SDK] Fix script to assign yaml_file via command line
Browse files Browse the repository at this point in the history
yaml_file variable is not passed to pkg_yaml_file in def
UploadSdkPackage, this CL fixes that bug.

Bug: 659808
Change-Id: I20fb5ca685993f540b4b4699ed5ebdc006e636ff
Reviewed-on: https://chromium-review.googlesource.com/848293
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: Shenghua Zhang <shenghuazhang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527054}
  • Loading branch information
Shenghua Zhang authored and Commit Bot committed Jan 4, 2018
1 parent 790ad3e commit 6010031
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tools/android/sdk_updater/update_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,9 @@ def UploadSdkPackage(sdk_root, dry_run, service_url, package, yaml_file,
pkg_version: The version of the package instance.
verbose: Enable more logging.
"""
if not yaml_file:
pkg_yaml_file = os.path.join(sdk_root, 'cipd_%s.yaml' % package)
if not os.path.exists(pkg_yaml_file):
raise IOError('Cannot find .yaml file for package %s' % package)
pkg_yaml_file = yaml_file or os.path.join(sdk_root, 'cipd_%s.yaml' % package)
if not os.path.exists(pkg_yaml_file):
raise IOError('Cannot find .yaml file for package %s' % package)

if dry_run:
print 'This `package` command (without -n/--dry-run) would create and',
Expand Down

0 comments on commit 6010031

Please sign in to comment.