diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r-- | lldb/packages/Python/lldbsuite/support/seven.py | 3 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/dosep.py | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/support/seven.py b/lldb/packages/Python/lldbsuite/support/seven.py index 1aab61f5926..29c6e9e1353 100644 --- a/lldb/packages/Python/lldbsuite/support/seven.py +++ b/lldb/packages/Python/lldbsuite/support/seven.py @@ -5,6 +5,7 @@ if six.PY2: get_command_output = commands.getoutput get_command_status_output = commands.getstatusoutput + cmp_ = cmp else: def get_command_status_output(command): try: @@ -15,3 +16,5 @@ else: def get_command_output(command): return get_command_status_output(command)[1] + + cmp_ = lambda x, y: (x > y) - (x < y)
\ No newline at end of file diff --git a/lldb/packages/Python/lldbsuite/test/dosep.py b/lldb/packages/Python/lldbsuite/test/dosep.py index 5a37850bc50..710be296455 100644 --- a/lldb/packages/Python/lldbsuite/test/dosep.py +++ b/lldb/packages/Python/lldbsuite/test/dosep.py @@ -59,6 +59,7 @@ import dotest_channels import dotest_args import lldb_utils import process_control +import lldbsuite.support.seven as seven # Status codes for running command with timeout. eTimedOut, ePassed, eFailed = 124, 0, 1 @@ -1244,7 +1245,7 @@ def is_darwin_version_lower_than(target_version): return False system_version = distutils.version.StrictVersion(platform.mac_ver()[0]) - return cmp(system_version, target_version) < 0 + return seven.cmp_(system_version, target_version) < 0 def default_test_runner_name(num_threads): |