fix a logic error that results in undefined variable being used
Change-Id: If3c5eca268220e8af5aa7dddbf0df7c05b873589 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
54dc431171
commit
23e7562272
@ -28,9 +28,9 @@ def validate_version(versionstr):
|
||||
semver = pbr.version.SemanticVersion.from_pip_string(versionstr)
|
||||
except ValueError as err:
|
||||
yield 'Invalid version: %s' % err
|
||||
|
||||
# Make sure pbr didn't change the version to meet the canonical form.
|
||||
canonical = semver.release_string()
|
||||
if canonical != versionstr:
|
||||
yield 'Version %r does not match canonical form %r' % \
|
||||
(versionstr, canonical)
|
||||
else:
|
||||
# Make sure pbr didn't change the version to meet the canonical form.
|
||||
canonical = semver.release_string()
|
||||
if canonical != versionstr:
|
||||
yield 'Version %r does not match canonical form %r' % \
|
||||
(versionstr, canonical)
|
||||
|
Loading…
Reference in New Issue
Block a user