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:
Doug Hellmann 2016-03-18 16:40:53 -04:00
parent 54dc431171
commit 23e7562272

View File

@ -28,7 +28,7 @@ def validate_version(versionstr):
semver = pbr.version.SemanticVersion.from_pip_string(versionstr)
except ValueError as err:
yield 'Invalid version: %s' % err
else:
# Make sure pbr didn't change the version to meet the canonical form.
canonical = semver.release_string()
if canonical != versionstr: