Skip to content

Commit

Permalink
Empty list should return None as well
Browse files Browse the repository at this point in the history
  • Loading branch information
amaltaro committed Aug 17, 2023
1 parent 3b8b315 commit 8e5afdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/python/WMCore/BossAir/Plugins/BasePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def cudaCapabilityToSingleVersion(capabilities=None):
For further details:
https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART____VERSION.html
"""
if not isinstance(capabilities, list):
if not (isinstance(capabilities, list) and capabilities):
return None
# now order the list of string versions in place. Precedence of digits is from left to right
# from: ["2.3.1", "1.2.3", "3.2.1", "1.3.2"]
Expand Down

0 comments on commit 8e5afdb

Please sign in to comment.