Skip to content

Commit

Permalink
Python 3 maxint compatibility
Browse files Browse the repository at this point in the history
Since sys.maxint was removed in Python 3, we should be using sys.maxsize
for compatibility, according
https://docs.python.org/3.1/whatsnew/3.0.html#integers

Closes-Bug: #1405609

Change-Id: I2fdc89c64285d81a79c78dd2482f93790673c8be
  • Loading branch information
arxcruz authored and boris-42 committed Jan 2, 2015
1 parent 98119d7 commit 2ee9c83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rally/benchmark/context/cleanup/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def setup(self):


# NOTE(amaretskiy): Set order to run this just before UserCleanup
@base.context(name="admin_cleanup", order=(sys.maxint - 1), hidden=True)
@base.context(name="admin_cleanup", order=(sys.maxsize - 1), hidden=True)
class AdminCleanup(CleanupMixin, base.Context):
"""Context class for admin resources cleanup."""

Expand All @@ -71,7 +71,7 @@ def cleanup(self):


# NOTE(amaretskiy): Set maximum order to run this last
@base.context(name="cleanup", order=sys.maxint, hidden=True)
@base.context(name="cleanup", order=sys.maxsize, hidden=True)
class UserCleanup(CleanupMixin, base.Context):
"""Context class for user resources cleanup."""

Expand Down

0 comments on commit 2ee9c83

Please sign in to comment.