There was an error while loading. Please reload this page.
1 parent 043f027 commit 9219f8bCopy full SHA for 9219f8b
pymongo/common.py
@@ -94,8 +94,9 @@ def validate_positive_float(option, value):
94
except (ValueError, TypeError):
95
raise err
96
97
- # float('inf') doesn't work in 2.4 or 2.5 on Windows, but this does
98
- if not 0 < value < 1e100000:
+ # float('inf') doesn't work in 2.4 or 2.5 on Windows, so just cap floats at
+ # one billion - this is a reasonable approximation for infinity
99
+ if not 0 < value < 1e9:
100
101
102
return value
0 commit comments