diff --git a/python/ray/tempfile_services.py b/python/ray/tempfile_services.py index 6e47c3991..c8da4e58b 100644 --- a/python/ray/tempfile_services.py +++ b/python/ray/tempfile_services.py @@ -57,7 +57,7 @@ def try_to_create_directory(directory_path): try: os.makedirs(directory_path) except OSError as e: - if e.errno != os.errno.EEXIST: + if e.errno != errno.EEXIST: raise e logger.warning( "Attempted to create '{}', but the directory already "