Merge "Use sys.maxsize instead of sys.maxint"
This commit is contained in:
commit
f064e4bb8e
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user