mirror of
https://github.com/wassname/ray.git
synced 2026-07-29 11:26:04 +08:00
[tune] Remove py2.7-specific code (#6665)
* Remove backwards compatability py2.7 code. * Use exists_ok=True in ray * nit * nit Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
This commit is contained in:
committed by
Richard Liaw
co-authored by
Richard Liaw
parent
970cd78701
commit
5b40408678
@@ -6,11 +6,6 @@ from __future__ import print_function
|
||||
import heapq
|
||||
import logging
|
||||
|
||||
try:
|
||||
FileNotFoundError
|
||||
except NameError:
|
||||
FileNotFoundError = IOError
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -44,12 +39,6 @@ class QueueItem:
|
||||
self.priority = priority
|
||||
self.value = value
|
||||
|
||||
def __cmp__(self, other):
|
||||
# For python2.7 compatibility.
|
||||
if self.priority == other.priority:
|
||||
return 0
|
||||
return -1 if self.priority < other.priority else 1
|
||||
|
||||
def __lt__(self, other):
|
||||
return self.priority < other.priority
|
||||
|
||||
|
||||
Reference in New Issue
Block a user