Merge "Use sys.maxsize instead of sys.maxint"

This commit is contained in:
Jenkins 2016-09-29 16:10:45 +00:00 committed by Gerrit Code Review
commit f064e4bb8e
2 changed files with 4 additions and 4 deletions

View File

@ -444,11 +444,11 @@ class CSARPackage(package_base.PackageBase):
spec = constraint['length']
if 'min' in spec:
translated['minLength'] = max(
translated.get('minLength', -sys.maxint - 1),
translated.get('minLength', -sys.maxsize - 1),
int(spec['min']))
if 'max' in spec:
translated['maxLength'] = min(
translated.get('maxLength', sys.maxint),
translated.get('maxLength', sys.maxsize),
int(spec['max']))
elif 'range' in constraint:

View File

@ -439,11 +439,11 @@ class HotPackage(package_base.PackageBase):
spec = constraint['length']
if 'min' in spec:
translated['minLength'] = max(
translated.get('minLength', -sys.maxint - 1),
translated.get('minLength', -sys.maxsize - 1),
int(spec['min']))
if 'max' in spec:
translated['maxLength'] = min(
translated.get('maxLength', sys.maxint),
translated.get('maxLength', sys.maxsize),
int(spec['max']))
elif 'range' in constraint: