Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version check fix: If module not found, it is not in the base repo #6115

Merged
merged 2 commits into from
Apr 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions tools/automation/tests/verify_package_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,16 @@ def changes_require_version_bump(mod_name, mod_version, mod_path, base_repo=None

def version_in_base_repo(base_repo, mod_path, mod_name, mod_version):
base_repo_mod_path = mod_path.replace(get_repo_root(), base_repo)
if mod_version == _get_mod_version(base_repo_mod_path):
print('Version {} of {} is already used on in the base repo.'.format(mod_version, mod_name))
return True
try:
if mod_version == _get_mod_version(base_repo_mod_path):
print('Version {} of {} is already used on in the base repo.'.format(mod_version, mod_name))
return True
except FileNotFoundError:
print('Module {} not in base repo. Skipping...'.format(mod_name), file=sys.stderr)
except Exception as ex:
# Print warning if unable to get module from base version (e.g. mod didn't exist there)
print('Warning: Unable to get module version from base repo... skipping...', file=sys.stderr)
print(str(ex), file=sys.stderr)
return False


Expand Down