Skip to content

Commit

Permalink
Test orig_devices for not None
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoMi committed Mar 1, 2022
1 parent d627a27 commit 477a95a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/single/test_ray.py
Expand Up @@ -55,7 +55,7 @@ def ray_start_4_cpus_4_gpus():
# The code after the yield will run as teardown code.
ray.shutdown()
finally:
if orig_devices:
if orig_devices is not None:
os.environ["CUDA_VISIBLE_DEVICES"] = orig_devices
else:
del os.environ["CUDA_VISIBLE_DEVICES"]
Expand Down

0 comments on commit 477a95a

Please sign in to comment.