Skip to content

Commit ac62305

Browse files
authored
Fix exception catching syntax
1 parent e1b1fd7 commit ac62305

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

codecarbon/core/gpu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def _get_memory_info(self):
143143
"""
144144
try:
145145
return pynvml.nvmlDeviceGetMemoryInfo(self.handle)
146-
except (pynvml.NVMLError_NotSupported):
146+
except pynvml.NVMLError_NotSupported:
147147
# this error is currently thrown for the NVIDIA Blackwell GPU, due to memory sharing on NVIDIA DGX Spark
148148
return pynvml.c_nvmlMemory_t(-1, -1, -1)
149149

0 commit comments

Comments
 (0)