Skip to content

Commit d80fa43

Browse files
committed
fix CPU features for older OpenCV versions
1 parent c713e49 commit d80fa43

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

version.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ def non_free_opencv_algorithms_present():
122122
#####################################################################
123123

124124
print("Available CPU Optimizations (*: build enabled; ?: not CPU supported):")
125-
print("... " + cv2.getCPUFeaturesLine())
126-
print()
125+
try:
126+
print("... " + cv2.getCPUFeaturesLine())
127+
print()
128+
except BaseException:
129+
print("... [ CPU feature check not available in this version ]")
130+
print()
127131

128132
#####################################################################

0 commit comments

Comments
 (0)